Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit 317da3c

Browse files
author
Sam Cooke
committed
Tests
1 parent fdae6c8 commit 317da3c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"scripts": {
1111
"lint": "BABEL_ENV=test eslint --config=.eslintrc.js . --max-warnings=0",
1212
"lint-fix": "BABEL_ENV=test eslint --config=.eslintrc.js . --fix",
13-
"test": "BABEL_ENV=test jest --config=jest.config.json",
13+
"test": "BABEL_ENV=test jest --config=jest.config.json --coverage",
1414
"test-watch": "BABEL_ENV=test jest --config=jest.config.json --watch --onlyChanged",
1515
"flow": "flow .",
1616
"compile": "babel --ignore __tests__,__mocks__ --out-dir lib/ src/",

src/__tests__/testUrls.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ describe('Urls', () => {
4545
expect(urls.makeLocation({urlName: 'home', params: {}})).toEqual({pathname: '/'});
4646
expect(urls.makeLocation({urlName: 'user:profile', params: {username: 'x'}})).toEqual({pathname: '/u/x/'});
4747
expect(urls.makeLocation({urlName: 'home', params: {}, query: {a: 'b'}})).toEqual({pathname: '/', search: '?a=b'});
48+
expect(urls.makeLocation({to: '/something/?a=b', state: {c: 'd'}})).toEqual({pathname: '/something/', search: '?a=b', state: {c: 'd'}, hash: ""});
49+
expect(urls.makeLocation({urlName: 'home', params: {}, query: {a: 'b'}, state: {c: 'd'}})).toEqual({pathname: '/', search: '?a=b', state: {c: 'd'}});
4850
});
4951

5052
it('should provide expected params', () => {

0 commit comments

Comments
 (0)