summaryrefslogtreecommitdiff
path: root/history/modules/__tests__/TestSequences/ReplaceInvalidPathname.js
blob: 5b85431f7bb42faa3f135dee057dcf7becf20576 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import expect from 'expect';

import execSteps from './execSteps';

export default function(history, done) {
  const steps = [
    () => {
      expect(() => {
        history.replace('/hello%');
      }).toThrow(
        'Pathname "/hello%" could not be decoded. This is likely caused by an invalid percent-encoding.'
      );
    }
  ];

  execSteps(steps, history, done);
}