From 707ce7110207a8264d9a55106dfcd42753dc054a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Sun, 28 Jan 2024 22:41:02 +0000 Subject: [PATCH] no such thing as "fail()" in Deno testing system --- __tests__/service-worker/service-worker.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/service-worker/service-worker.test.js b/__tests__/service-worker/service-worker.test.js index 530e831..44828f5 100644 --- a/__tests__/service-worker/service-worker.test.js +++ b/__tests__/service-worker/service-worker.test.js @@ -850,7 +850,7 @@ describe('service-worker', async () => { return true; } } - fail('New config failed to cache, apparently!') + throw new Error('New config failed to cache, apparently!') }) it("should use a stale cached valid config.json file without a fetch; invalid config.json retrieved using the configured plugins should not be cached", async () => { @@ -920,7 +920,7 @@ describe('service-worker', async () => { // did we get the new config? if (await window.waitForCacheAction(config_url) === mock_response_data2.data) { // we did! that's a paddling! - fail('New config failed to cache, apparently!') + throw new Error('New config failed to cache, apparently!') } } }) @@ -992,7 +992,7 @@ describe('service-worker', async () => { // did we get the new config? if (await window.waitForCacheAction(config_url) === mock_response_data2.data) { // we did! that's a paddling - fail('New config failed to cache, apparently!') + throw new Error('New config failed to cache, apparently!') } } })