Skip to content

Commit

Permalink
Small tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Nov 7, 2019
1 parent 2acce39 commit 50997b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions modules/__tests__/createBrowserHistory-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@ describe('a browser history', () => {
});

it('does not encode the generated path', () => {
// encoded
const encodedHref = history.createHref({
pathname: '/%23abc'
});
// unencoded
expect(encodedHref).toEqual('/%23abc');

const unencodedHref = history.createHref({
pathname: '/#abc'
});

expect(encodedHref).toEqual('/%23abc');
expect(unencodedHref).toEqual('/#abc');
});

Expand Down
6 changes: 2 additions & 4 deletions modules/__tests__/createHashHistory-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,14 @@ describe('a hash history', () => {
});

it('does not encode the generated path', () => {
// encoded
const encodedHref = history.createHref({
pathname: '/%23abc'
});
// unencoded
expect(encodedHref).toEqual('#/%23abc');

const unencodedHref = history.createHref({
pathname: '/#abc'
});

expect(encodedHref).toEqual('#/%23abc');
expect(unencodedHref).toEqual('#/#abc');
});

Expand Down
6 changes: 2 additions & 4 deletions modules/__tests__/createMemoryHistory-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@ describe('a memory history', () => {
});

it('does not encode the generated path', () => {
// encoded
const encodedHref = history.createHref({
pathname: '/%23abc'
});
// unencoded
expect(encodedHref).toEqual('/%23abc');

const unencodedHref = history.createHref({
pathname: '/#abc'
});

expect(encodedHref).toEqual('/%23abc');
expect(unencodedHref).toEqual('/#abc');
});

Expand Down

0 comments on commit 50997b3

Please sign in to comment.