Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 621ebc4

Browse files
author
Sean
authored
Merge pull request #521 from GSA/ss-parsec
update jest
2 parents e545814 + 3434648 commit 621ebc4

File tree

3 files changed

+5
-37
lines changed

3 files changed

+5
-37
lines changed

assets/data/filters/repos.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@
1515
{ "name": "Department of Transportation", "value": "DOT" },
1616
{ "name": "Department of Veterans Affairs", "value": "VA" },
1717
{ "name": "Environmental Protection Agency", "value": "EPA" },
18-
{ "name": "Executive Office of the President", "value": "EOP" },
19-
{ "name": "Federal Election Commission", "value": "FEC" },
2018
{ "name": "General Services Administration", "value": "GSA" },
2119
{ "name": "National Aeronautics and Space Administration", "value": "NASA" },
22-
{ "name": "National Archives and Records Administration", "value": "NARA" },
2320
{ "name": "National Science Foundation", "value": "NSF" },
2421
{ "name": "Office of Personnel Management", "value": "OPM" },
2522
{ "name": "Small Business Administration", "value": "SBA" },

src/actions/sync-url-search-params.test.js

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ const params = {
99
filters: [
1010
{ category: 'ca-1', value: 'va-1' },
1111
{ category: 'ca-2', value: 'va-2' },
12-
{ category: 'ca-2', value: 'va-3' },
12+
{ category: 'ca-2', value: 'va-3' }
1313
],
1414
number: 123,
1515
string: 'test-string',
16-
ignored: { test: 'value' },
16+
ignored: { test: 'value' }
1717
}
1818
const paramsAsSearch = '&ca-1=va-1&ca-2=va-2%2Cva-3&number=123&string=test-string'
1919
const state = {
2020
browseParams: params,
2121
searchParams: params,
22-
taskParams: params,
22+
taskParams: params
2323
}
2424

2525
const dispatch = jest.fn()
@@ -39,12 +39,6 @@ describe('actions - sync-url-search-params', () => {
3939
expect(dispatch).not.toBeCalled()
4040
})
4141

42-
it('should dispatch the `push` action with the new url', async () => {
43-
await syncUrlSearchParams(state)(dispatch)
44-
expect(dispatch).toBeCalled()
45-
expect(push).toBeCalledWith('/browse-projects')
46-
})
47-
4842
it('should `push` with the new search params from state', async () => {
4943
pushPath('/browse-projects?a=123&b=test')
5044
await syncUrlSearchParams(state)(dispatch)
@@ -75,29 +69,6 @@ describe('actions - sync-url-search-params', () => {
7569
})
7670
})
7771

78-
describe('on `/open-tasks` route', () => {
79-
beforeEach(() => {
80-
pushPath('/open-tasks')
81-
})
82-
83-
it('should not dispatch any actions if `taskParams` are not in state', async () => {
84-
await syncUrlSearchParams({ ...state, taskParams: undefined })(dispatch)
85-
expect(dispatch).not.toBeCalled()
86-
})
87-
88-
it('should dispatch the `push` action with the new url', async () => {
89-
await syncUrlSearchParams(state)(dispatch)
90-
expect(dispatch).toBeCalled()
91-
expect(push).toBeCalledWith('/open-tasks')
92-
})
93-
94-
it('should `push` with the new task params from state', async () => {
95-
pushPath('/open-tasks?a=123&b=test')
96-
await syncUrlSearchParams(state)(dispatch)
97-
expect(push).toBeCalledWith(`/open-tasks?${paramsAsSearch}`)
98-
})
99-
})
100-
10172
describe('on other route', () => {
10273
beforeEach(() => {
10374
pushPath('/other-route')
@@ -108,4 +79,4 @@ describe('actions - sync-url-search-params', () => {
10879
expect(dispatch).not.toBeCalled()
10980
})
11081
})
111-
})
82+
})

src/components/home-explore/__snapshots__/home-explore.container.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Object {
2828
"links": Array [
2929
Object {
3030
"name": "Agency Compliance",
31-
"url": "/federal-agencies/compliance/dashboard",
31+
"url": "/agency-compliance/compliance/dashboard",
3232
},
3333
],
3434
"title": "Agency Partners",

0 commit comments

Comments
 (0)