Skip to content

Commit

Permalink
fix: make worker integrity mismatch a warning (#2090)
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Mar 16, 2024
1 parent 67a4298 commit a0f8021
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/browser/setupWorker/start/createStartHandler.ts
Expand Up @@ -80,7 +80,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
)

if (integrityCheckResult.error) {
devUtils.error(`\
devUtils.warn(`\
Detected outdated Service Worker: ${integrityCheckResult.error.message}
The mocking is still enabled, but it's highly recommended that you update your Service Worker by running:
Expand Down
2 changes: 1 addition & 1 deletion test/browser/msw-api/integrity-check.test.ts
Expand Up @@ -65,7 +65,7 @@ test('errors when activating the worker with an outdated integrity', async ({

await waitFor(() => {
// Produces a meaningful error in the browser's console.
expect(consoleSpy.get('error')).toEqual(
expect(consoleSpy.get('warning')).toEqual(
expect.arrayContaining([
expect.stringContaining('[MSW] Detected outdated Service Worker'),
]),
Expand Down

0 comments on commit a0f8021

Please sign in to comment.