Skip to content

Commit

Permalink
Remove test duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Sep 12, 2019
1 parent c761c48 commit 90561da
Showing 1 changed file with 0 additions and 72 deletions.
72 changes: 0 additions & 72 deletions modules/__tests__/HashHistory-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,75 +213,3 @@ describe('a hash history', () => {
});
});
});

describe('a hash history with "slash" path coding', () => {
beforeEach(() => {
if (window.location.hash !== '#/') {
window.location.hash = '/';
}
});

it('properly encodes and decodes window.location.hash', done => {
const history = createHashHistory({ hashType: 'slash' });
TestSequences.SlashHashPathCoding(history, done);
});

it('knows how to create hrefs', () => {
const history = createHashHistory({ hashType: 'slash' });
const href = history.createHref({
pathname: '/the/path',
search: '?the=query',
hash: '#the-hash'
});

expect(href).toEqual('#/the/path?the=query#the-hash');
});
});

describe('a hash history with "hashbang" path coding', () => {
beforeEach(() => {
if (window.location.hash !== '#!/') {
window.location.hash = '!/';
}
});

it('properly encodes and decodes window.location.hash', done => {
const history = createHashHistory({ hashType: 'hashbang' });
TestSequences.HashbangHashPathCoding(history, done);
});

it('knows how to create hrefs', () => {
const history = createHashHistory({ hashType: 'hashbang' });
const href = history.createHref({
pathname: '/the/path',
search: '?the=query',
hash: '#the-hash'
});

expect(href).toEqual('#!/the/path?the=query#the-hash');
});
});

describe('a hash history with "noslash" path coding', () => {
beforeEach(() => {
if (window.location.hash !== '') {
window.location.hash = '';
}
});

it('properly encodes and decodes window.location.hash', done => {
const history = createHashHistory({ hashType: 'noslash' });
TestSequences.NoslashHashPathCoding(history, done);
});

it('knows how to create hrefs', () => {
const history = createHashHistory({ hashType: 'noslash' });
const href = history.createHref({
pathname: '/the/path',
search: '?the=query',
hash: '#the-hash'
});

expect(href).toEqual('#the/path?the=query#the-hash');
});
});

0 comments on commit 90561da

Please sign in to comment.