-
Notifications
You must be signed in to change notification settings - Fork 266
[WORLDSERVICE-464] Remove sw.js for Public Services #12566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
023e582
c823c44
9b2989b
cc31758
c210d37
5bf38c4
16f79f4
643a20d
c3479eb
4f4d5bb
7f46c5e
2b57114
0434dbc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -952,13 +952,6 @@ describe('Server', () => { | |
| }); | ||
|
|
||
| describe('Service workers', () => { | ||
| it('should serve a file for existing service workers', async () => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we make sure there's still a test for existence of
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, we should def keep it. Updated |
||
| await makeRequest('/news/articles/sw.js'); | ||
| expect(sendFileSpy.mock.calls[0][0]).toEqual( | ||
| path.join(__dirname, '/public/sw.js'), | ||
| ); | ||
| }); | ||
|
|
||
| it('should not serve a file for non-existing service workers', async () => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we update this test to use one of the public services as the test (instead of |
||
| const { statusCode } = await makeRequest('/some-service/articles/sw.js'); | ||
| expect(sendFileSpy.mock.calls.length).toEqual(0); | ||
|
|
@@ -975,11 +968,9 @@ describe('Server', () => { | |
|
|
||
| describe('Manifest json', () => { | ||
| it.each` | ||
| manifestPath | expectedManifestFile | ||
| ${'/pidgin/articles/manifest.json'} | ${'/pidgin/manifest.json'} | ||
| ${'/pidgin/manifest.json'} | ${'/pidgin/manifest.json'} | ||
| ${'/serbian/articles/manifest.json'} | ${'/serbian/manifest.json'} | ||
| ${'/serbian/manifest.json'} | ${'/serbian/manifest.json'} | ||
| manifestPath | expectedManifestFile | ||
| ${'/pidgin/manifest.json'} | ${'/pidgin/manifest.json'} | ||
| ${'/serbian/manifest.json'} | ${'/serbian/manifest.json'} | ||
| `( | ||
| 'should serve a file for $manifestPath', | ||
| async ({ manifestPath, expectedManifestFile }) => { | ||
|
|
@@ -997,7 +988,7 @@ describe('Server', () => { | |
| }); | ||
|
|
||
| it('should serve a response cache control of 1 day', async () => { | ||
| const { header } = await makeRequest('/pidgin/articles/manifest.json'); | ||
| const { header } = await makeRequest('/pidgin/manifest.json'); | ||
| expect(header['cache-control']).toBe( | ||
| 'public, stale-if-error=172800, stale-while-revalidate=172800, max-age=86400', | ||
| ); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.