diff --git a/test/apps/basics/test.ts b/test/apps/basics/test.ts index 388fb0b86..ae8f3473d 100644 --- a/test/apps/basics/test.ts +++ b/test/apps/basics/test.ts @@ -324,11 +324,11 @@ describe('basics', function() { await r.load('/dirs/bar/xyz'); await r.sapper.start(); - assert.equal(await r.text('h1'), 'A page'); + assert.strictEqual(await r.text('h1'), 'A page'); await r.page.click('[href="dirs/foo/xyz"]'); await r.wait(); - assert.equal(await r.text('h1'), 'B page'); + assert.strictEqual(await r.text('h1'), 'B page'); }); it('find regexp routes', async () => { diff --git a/test/apps/credentials/test.ts b/test/apps/credentials/test.ts index 2a55c68bc..aa0a90fda 100644 --- a/test/apps/credentials/test.ts +++ b/test/apps/credentials/test.ts @@ -22,7 +22,7 @@ describe('credentials', function() { it('sends cookies when using this.fetch with credentials: "include"', async () => { await r.load('/credentials?creds=include&type=cookie'); - assert.equal( + assert.strictEqual( await r.text('h1'), 'a: 1, b: 2, max-age: undefined' ); @@ -31,7 +31,7 @@ describe('credentials', function() { it('does not send cookies when using this.fetch with credentials: "omit"', async () => { await r.load('/credentials?creds=omit&type=cookie'); - assert.equal( + assert.strictEqual( await r.text('h1'), 'unauthorized' ); @@ -40,7 +40,7 @@ describe('credentials', function() { it('sends cookies to same origin when using this.fetch without credentials', async () => { await r.load('/credentials?type=cookie'); - assert.equal( + assert.strictEqual( await r.text('h1'), 'a: 1, b: 2, max-age: undefined' ); @@ -52,7 +52,7 @@ describe('credentials', function() { it('sends authorization when using this.fetch with credentials: "include"', async () => { await r.load('/credentials?creds=include&type=authorization'); - assert.equal( + assert.strictEqual( await r.text('h1'), 'my-auth' ); @@ -61,7 +61,7 @@ describe('credentials', function() { it('does not send authorization when using this.fetch with credentials: "omit"', async () => { await r.load('/credentials?creds=omit&type=authorization'); - assert.equal( + assert.strictEqual( await r.text('h1'), 'unauthorized' ); @@ -70,7 +70,7 @@ describe('credentials', function() { it('sends authorization to same origin when using this.fetch without credentials', async () => { await r.load('/credentials?type=authorization'); - assert.equal( + assert.strictEqual( await r.text('h1'), 'my-auth' ); @@ -86,13 +86,13 @@ describe('credentials', function() { await r.page.click('#cookie'); await r.wait(); - assert.equal( + assert.strictEqual( await r.text('h1'), 'a: 1, b: 2, max-age: undefined' ); }); it('survives the tests with no server errors', () => { - assert.deepEqual(r.errors, []); + assert.deepStrictEqual(r.errors, []); }); }); diff --git a/test/apps/css/test.ts b/test/apps/css/test.ts index 54214140e..17de33dca 100644 --- a/test/apps/css/test.ts +++ b/test/apps/css/test.ts @@ -19,7 +19,7 @@ describe('css', function() { it('includes critical CSS with server render', async () => { await r.load('/'); - assert.equal( + assert.strictEqual( await r.page.$eval('h1', node => getComputedStyle(node).color), 'rgb(255, 0, 0)' ); @@ -28,7 +28,7 @@ describe('css', function() { it('includes CSS on error page', async () => { await r.load('/doesnotexist'); - assert.equal( + assert.strictEqual( await r.page.$eval('h1', node => getComputedStyle(node).color), 'rgb(128, 0, 128)' ); @@ -37,7 +37,7 @@ describe('css', function() { // note that we're specifically testing another route here and not just a component it('includes CSS from imported route', async () => { await r.load('/index2'); - assert.equal( + assert.strictEqual( await r.page.$eval('h1', node => getComputedStyle(node).color), 'rgb(255, 0, 0)' ); @@ -52,7 +52,7 @@ describe('css', function() { await r.page.click(`[href="foo"]`); await r.wait(); - assert.equal( + assert.strictEqual( await r.page.$eval('h1', node => getComputedStyle(node).color), 'rgb(0, 0, 255)' ); @@ -67,13 +67,13 @@ describe('css', function() { await r.page.click(`[href="bar"]`); await r.wait(); - assert.equal( + assert.strictEqual( await r.page.$eval('h1', node => getComputedStyle(node).color), 'rgb(0, 128, 0)' ); }); it('survives the tests with no server errors', () => { - assert.deepEqual(r.errors, []); + assert.deepStrictEqual(r.errors, []); }); }); diff --git a/test/apps/custom-extension/test.ts b/test/apps/custom-extension/test.ts index d0df861f8..7adad08cf 100644 --- a/test/apps/custom-extension/test.ts +++ b/test/apps/custom-extension/test.ts @@ -21,7 +21,7 @@ describe('custom extensions', function() { await r.load(`/`); - assert.equal( + assert.strictEqual( await r.text('h1'), 'Great success!' ); @@ -30,28 +30,28 @@ describe('custom extensions', function() { it('works with other arbitrary extensions', async () => { await r.load(`/const`); - assert.equal( + assert.strictEqual( await r.text('h1'), 'Tremendous!' ); await r.load(`/a`); - assert.equal( + assert.strictEqual( await r.text('h1'), 'a' ); await r.load(`/test-slug`); - assert.equal( + assert.strictEqual( await r.text('h1'), 'TEST-SLUG' ); await r.load(`/unsafe-replacement`); - assert.equal( + assert.strictEqual( await r.text('h1'), 'Bazooom!' ); diff --git a/test/apps/encoding/test.ts b/test/apps/encoding/test.ts index 0d51b6437..818c41873 100644 --- a/test/apps/encoding/test.ts +++ b/test/apps/encoding/test.ts @@ -19,7 +19,7 @@ describe('encoding', function() { it('encodes routes', async () => { await r.load('/fünke'); - assert.equal( + assert.strictEqual( await r.text('h1'), `I'm afraid I just blue myself` ); @@ -28,7 +28,7 @@ describe('encoding', function() { it('encodes req.params and req.query for server-rendered pages', async () => { await r.load('/echo/page/encöded?message=hëllö+wörld&föo=bar&=baz&tel=%2B123456789'); - assert.equal( + assert.strictEqual( await r.text('h1'), 'encöded {"message":"hëllö wörld","föo":"bar","":"baz","tel":"+123456789"}' ); @@ -42,7 +42,7 @@ describe('encoding', function() { await r.page.click('a'); await r.wait(); - assert.equal( + assert.strictEqual( await r.text('h1'), 'encöded {"message":"hëllö wörld","föo":"bar","":"baz","tel":"+123456789"}' ); @@ -51,13 +51,13 @@ describe('encoding', function() { it('encodes req.params for server routes', async () => { await r.load('/echo/server-route/encöded'); - assert.equal( + assert.strictEqual( await r.text('h1'), 'encöded' ); }); it('survives the tests with no server errors', () => { - assert.deepEqual(r.errors, []); + assert.deepStrictEqual(r.errors, []); }); }); diff --git a/test/apps/errors/test.ts b/test/apps/errors/test.ts index 1c4eee69f..db1ee39c2 100644 --- a/test/apps/errors/test.ts +++ b/test/apps/errors/test.ts @@ -19,7 +19,7 @@ describe('errors', function() { it('handles missing route on server', async () => { await r.load('/nope'); - assert.equal( + assert.strictEqual( await r.text('h1'), '404' ); @@ -32,7 +32,7 @@ describe('errors', function() { await r.page.click('[href="nope"]'); await r.wait(); - assert.equal( + assert.strictEqual( await r.text('h1'), '404' ); @@ -41,7 +41,7 @@ describe('errors', function() { it('handles explicit 4xx on server', async () => { await r.load('/blog/nope'); - assert.equal( + assert.strictEqual( await r.text('h1'), '404' ); @@ -55,7 +55,7 @@ describe('errors', function() { await r.page.click('[href="blog/nope"]'); await r.wait(); - assert.equal( + assert.strictEqual( await r.text('h1'), '404' ); @@ -64,7 +64,7 @@ describe('errors', function() { it('handles error on server', async () => { await r.load('/throw'); - assert.equal( + assert.strictEqual( await r.text('h1'), '500' ); @@ -87,7 +87,7 @@ describe('errors', function() { await r.page.click('[href="throw"]'); await r.wait(); - assert.equal( + assert.strictEqual( await r.text('h1'), '500' ); @@ -97,7 +97,7 @@ describe('errors', function() { await r.load('/preload-reject'); await r.sapper.start(); - assert.equal( + assert.strictEqual( await r.text('h1'), '500' ); @@ -106,7 +106,7 @@ describe('errors', function() { it('does not serve error page for explicit non-page errors', async () => { await r.load('/nope.json'); - assert.equal( + assert.strictEqual( await r.text('body'), 'nope' ); @@ -115,7 +115,7 @@ describe('errors', function() { it('does not serve error page for thrown non-page errors', async () => { await r.load('/throw.json'); - assert.equal( + assert.strictEqual( await r.text('body'), 'oops' ); @@ -125,7 +125,7 @@ describe('errors', function() { await r.load('/some-throw-page'); await r.sapper.start(); - assert.equal( + assert.strictEqual( await r.text('h2'), 'success' ); @@ -134,7 +134,7 @@ describe('errors', function() { it('does not serve error page for async non-page error', async () => { await r.load('/async-throw.json'); - assert.equal( + assert.strictEqual( await r.text('body'), 'oops' ); @@ -147,14 +147,14 @@ describe('errors', function() { await r.page.click('[href="enhance-your-calm"]'); await r.wait(); - assert.equal(await r.text('h1'), '420'); + assert.strictEqual(await r.text('h1'), '420'); await r.page.goBack(); await r.wait(); - assert.equal(await r.text('h1'), 'No error here'); + assert.strictEqual(await r.text('h1'), 'No error here'); }); it('survives the tests with no server errors', () => { - assert.deepEqual(r.errors, []); + assert.deepStrictEqual(r.errors, []); }); }); diff --git a/test/apps/export-without-serviceworker/test.ts b/test/apps/export-without-serviceworker/test.ts index ad747f2a2..766c64ddc 100644 --- a/test/apps/export-without-serviceworker/test.ts +++ b/test/apps/export-without-serviceworker/test.ts @@ -19,7 +19,7 @@ describe('export w/o serviceworker', function() { assert.ok(client_assets.length > 0); - assert.deepEqual(non_client_assets.sort(), [ + assert.deepStrictEqual(non_client_assets.sort(), [ 'global.css', 'index.html', ].sort()); diff --git a/test/apps/export/test.ts b/test/apps/export/test.ts index 482eb2b37..26cb79439 100644 --- a/test/apps/export/test.ts +++ b/test/apps/export/test.ts @@ -28,7 +28,7 @@ describe('export', function() { } } - assert.deepEqual(non_client_assets.sort(), [ + assert.deepStrictEqual(non_client_assets.sort(), [ 'blog.json', 'blog/bar.json', 'blog/bar/index.html', diff --git a/test/apps/ignore/test.ts b/test/apps/ignore/test.ts index 12b2da4cf..7e1f088d2 100644 --- a/test/apps/ignore/test.ts +++ b/test/apps/ignore/test.ts @@ -19,7 +19,7 @@ describe('ignore', function() { it('respects `options.ignore` values (RegExp)', async () => { await r.load('/foobar'); - assert.equal( + assert.strictEqual( await r.text('body'), 'foobar' ); @@ -28,7 +28,7 @@ describe('ignore', function() { it('respects `options.ignore` values (String #1)', async () => { await r.load('/buzz'); - assert.equal( + assert.strictEqual( await r.text('body'), 'buzz' ); @@ -37,7 +37,7 @@ describe('ignore', function() { it('respects `options.ignore` values (String #2)', async () => { await r.load('/fizzer'); - assert.equal( + assert.strictEqual( await r.text('body'), 'fizzer' ); @@ -46,13 +46,13 @@ describe('ignore', function() { it('respects `options.ignore` values (Function)', async () => { await r.load('/hello'); - assert.equal( + assert.strictEqual( await r.text('body'), 'hello' ); }); it('survives the tests with no server errors', () => { - assert.deepEqual(r.errors, []); + assert.deepStrictEqual(r.errors, []); }); }); diff --git a/test/apps/layout/src/routes/[x]/[y]/_layout.svelte b/test/apps/layout/src/routes/[x]/[y]/_layout.svelte index 79102b7f7..398ab0595 100644 --- a/test/apps/layout/src/routes/[x]/[y]/_layout.svelte +++ b/test/apps/layout/src/routes/[x]/[y]/_layout.svelte @@ -13,7 +13,7 @@ const { page } = stores(); export let count; - export let segment; + $: segment = $page.path.split("/")[3]; y: {$page.params.y} {count} diff --git a/test/apps/layout/test.ts b/test/apps/layout/test.ts index 912be6311..4d7ae5b76 100644 --- a/test/apps/layout/test.ts +++ b/test/apps/layout/test.ts @@ -20,7 +20,7 @@ describe('layout', function() { await r.load('/foo/bar/baz'); const text1 = await r.text('#sapper'); - assert.equal(text1.split('\n').map(str => str.trim()).filter(Boolean).join(' '), [ + assert.strictEqual(text1.split('\n').map(str => str.trim()).filter(Boolean).join(' '), [ 'y: bar 1', 'z: baz 1', 'goto foo/bar/qux', @@ -30,7 +30,7 @@ describe('layout', function() { await r.sapper.start(); const text2 = await r.text('#sapper'); - assert.equal(text2.split('\n').map(str => str.trim()).filter(Boolean).join(' '), [ + assert.strictEqual(text2.split('\n').map(str => str.trim()).filter(Boolean).join(' '), [ 'y: bar 1', 'z: baz 1', 'goto foo/bar/qux', @@ -42,7 +42,7 @@ describe('layout', function() { await r.wait(); const text3 = await r.text('#sapper'); - assert.equal(text3.split('\n').map(str => str.trim()).filter(Boolean).join(' '), [ + assert.strictEqual(text3.split('\n').map(str => str.trim()).filter(Boolean).join(' '), [ 'y: bar 1', 'z: qux 2', 'goto foo/bar/qux', @@ -54,7 +54,7 @@ describe('layout', function() { await r.wait(); const text4 = await r.text('#sapper'); - assert.equal(text4.split('\n').map(str => str.trim()).filter(Boolean).join(' '), [ + assert.strictEqual(text4.split('\n').map(str => str.trim()).filter(Boolean).join(' '), [ 'y: abc 2', 'z: def 3', 'goto foo/bar/qux', @@ -64,6 +64,6 @@ describe('layout', function() { }); it('survives the tests with no server errors', () => { - assert.deepEqual(r.errors, []); + assert.deepStrictEqual(r.errors, []); }); }); diff --git a/test/apps/preloading/test.ts b/test/apps/preloading/test.ts index e22622f36..80d15af6d 100644 --- a/test/apps/preloading/test.ts +++ b/test/apps/preloading/test.ts @@ -21,19 +21,19 @@ describe('preloading', function() { it('serializes Set objects returned from preload', async () => { await r.load('/preload-values/set'); - assert.equal(await r.text('h1'), 'true'); + assert.strictEqual(await r.text('h1'), 'true'); await r.sapper.start(); - assert.equal(await r.text('h1'), 'true'); + assert.strictEqual(await r.text('h1'), 'true'); }); it('retrieves host from preload', async () => { await r.load('/preload-values/host'); - assert.equal(await r.text('h1'), 'localhost'); + assert.strictEqual(await r.text('h1'), 'localhost'); await r.sapper.start(); - assert.equal(await r.text('h1'), 'localhost'); + assert.strictEqual(await r.text('h1'), 'localhost'); }); it('prevent crash if preload return nothing', async () => { @@ -41,16 +41,16 @@ describe('preloading', function() { await r.sapper.start(); - assert.equal(await r.text('h1'), 'Page loaded'); + assert.strictEqual(await r.text('h1'), 'Page loaded'); }); it('bails on custom classes returned from preload', async () => { await r.load('/preload-values/custom-class'); - assert.equal(await r.text('h1'), '42'); + assert.strictEqual(await r.text('h1'), '42'); await r.sapper.start(); - assert.equal(await r.text('h1'), '42'); + assert.strictEqual(await r.text('h1'), '42'); }); it('sets preloading true when appropriate', async () => { @@ -68,7 +68,7 @@ describe('preloading', function() { it('runs preload in root component', async () => { await r.load('/preload-root'); - assert.equal(await r.text('h1'), 'root preload function ran: true'); + assert.strictEqual(await r.text('h1'), 'root preload function ran: true'); }); it('cancels navigation if subsequent navigation occurs during preload', async () => { @@ -80,13 +80,13 @@ describe('preloading', function() { await r.wait(); await r.page.click('a[href="foo"]'); - assert.equal(r.page.url(), `${r.base}/foo`); - assert.equal(await r.text('h1'), 'foo'); + assert.strictEqual(r.page.url(), `${r.base}/foo`); + assert.strictEqual(await r.text('h1'), 'foo'); await r.page.evaluate(() => fulfil()); await r.wait(); - assert.equal(r.page.url(), `${r.base}/foo`); - assert.equal(await r.text('h1'), 'foo'); + assert.strictEqual(r.page.url(), `${r.base}/foo`); + assert.strictEqual(await r.text('h1'), 'foo'); }); it('navigates to prefetched urls', async () => { @@ -102,21 +102,21 @@ describe('preloading', function() { await r.page.click('a[href="prefetch/qwe"]'); await r.wait(); - assert.equal( + assert.strictEqual( await r.text('h1'), 'qwe' ); await r.load('/prefetch'); - assert.equal( + assert.strictEqual( await r.text('h1'), 'prefetch' ); }); it('survives the tests with no server errors', () => { - assert.deepEqual(r.errors, []); + assert.deepStrictEqual(r.errors, []); }); it('re-runs preload when page.query changes', async () => { @@ -124,7 +124,7 @@ describe('preloading', function() { await r.sapper.start(); await r.sapper.prefetchRoutes(); - assert.equal( + assert.strictEqual( await r.text('pre'), `{"foo":"1"}` ); @@ -132,7 +132,7 @@ describe('preloading', function() { await r.page.click('a[href="echo?foo=2"]'); await r.wait(); - assert.equal( + assert.strictEqual( await r.text('pre'), `{"foo":"2"}` ); diff --git a/test/apps/redirects/test.ts b/test/apps/redirects/test.ts index 1d8f12534..c92617597 100644 --- a/test/apps/redirects/test.ts +++ b/test/apps/redirects/test.ts @@ -20,12 +20,12 @@ describe('redirects', function() { it('redirects on server', async () => { await r.load('/redirect-from'); - assert.equal( + assert.strictEqual( r.page.url(), `${r.base}/redirect-to` ); - assert.equal( + assert.strictEqual( await r.text('h1'), 'redirected' ); @@ -39,12 +39,12 @@ describe('redirects', function() { await r.page.click('[href="redirect-from"]'); await r.wait(); - assert.equal( + assert.strictEqual( r.page.url(), `${r.base}/redirect-to` ); - assert.equal( + assert.strictEqual( await r.text('h1'), 'redirected' ); @@ -53,12 +53,12 @@ describe('redirects', function() { it('redirects to root on server', async () => { await r.load('/redirect-to-root'); - assert.equal( + assert.strictEqual( r.page.url(), `${r.base}/` ); - assert.equal( + assert.strictEqual( await r.text('h1'), 'root' ); @@ -72,12 +72,12 @@ describe('redirects', function() { await r.page.click('[href="redirect-to-root"]'); await r.wait(); - assert.equal( + assert.strictEqual( r.page.url(), `${r.base}/` ); - assert.equal( + assert.strictEqual( await r.text('h1'), 'root' ); @@ -100,12 +100,12 @@ describe('redirects', function() { await r.load('/redirect-to-external'); }); - assert.equal( + assert.strictEqual( r.page.url(), `https://example.com/` ); - assert.equal( + assert.strictEqual( await r.text('h1'), 'external' ); @@ -121,18 +121,18 @@ describe('redirects', function() { await r.wait(); }); - assert.equal( + assert.strictEqual( r.page.url(), `https://example.com/` ); - assert.equal( + assert.strictEqual( await r.text('h1'), 'external' ); }); it('survives the tests with no server errors', () => { - assert.deepEqual(r.errors, []); + assert.deepStrictEqual(r.errors, []); }); }); diff --git a/test/apps/scroll/test.ts b/test/apps/scroll/test.ts index da304d2b8..eb7d62f18 100644 --- a/test/apps/scroll/test.ts +++ b/test/apps/scroll/test.ts @@ -51,7 +51,7 @@ describe('scroll', function() { await r.page.click('[href="another-tall-page"]'); await r.wait(); - assert.equal( + assert.strictEqual( await r.page.evaluate(() => window.scrollY), 0 ); @@ -77,7 +77,7 @@ describe('scroll', function() { await r.page.click('[href="another-tall-page#bar"]'); await r.wait(); - assert.equal(await r.text('h1'), 'Another tall page'); + assert.strictEqual(await r.text('h1'), 'Another tall page'); const scrollY = await r.page.evaluate(() => window.scrollY); assert.ok(scrollY > 0); }); @@ -99,7 +99,7 @@ describe('scroll', function() { await r.wait(); const secondScrollY = await r.page.evaluate(() => window.scrollY); - assert.equal(firstScrollY, secondScrollY); + assert.strictEqual(firstScrollY, secondScrollY); }); it('scrolls to the top when navigating with goto', async () => { @@ -141,6 +141,6 @@ describe('scroll', function() { }); it('survives the tests with no server errors', () => { - assert.deepEqual(r.errors, []); + assert.deepStrictEqual(r.errors, []); }); }); diff --git a/test/apps/session/test.ts b/test/apps/session/test.ts index e1e91bfac..faa05a45f 100644 --- a/test/apps/session/test.ts +++ b/test/apps/session/test.ts @@ -19,25 +19,25 @@ describe('session', function() { it('renders session props', async () => { await r.load('/session'); - assert.equal(await r.text('h1'), 'hello world'); + assert.strictEqual(await r.text('h1'), 'hello world'); await r.sapper.start(); - assert.equal(await r.text('h1'), 'hello world'); + assert.strictEqual(await r.text('h1'), 'hello world'); await r.page.click('button'); - assert.equal(await r.text('h1'), 'changed'); + assert.strictEqual(await r.text('h1'), 'changed'); }); it('preloads session props', async () => { await r.load('/preloaded'); - assert.equal(await r.text('h1'), 'hello world'); + assert.strictEqual(await r.text('h1'), 'hello world'); await r.sapper.start(); - assert.equal(await r.text('h1'), 'hello world'); + assert.strictEqual(await r.text('h1'), 'hello world'); await r.page.click('button'); - assert.equal(await r.text('h1'), 'changed'); + assert.strictEqual(await r.text('h1'), 'changed'); }); it('survives exception from session getter', async () => { @@ -45,6 +45,6 @@ describe('session', function() { }); it('survives the tests with no server errors', () => { - assert.deepEqual(r.errors, []); + assert.deepStrictEqual(r.errors, []); }); }); diff --git a/test/apps/with-basepath/test.ts b/test/apps/with-basepath/test.ts index 0aae2fee5..b6d6aaa95 100644 --- a/test/apps/with-basepath/test.ts +++ b/test/apps/with-basepath/test.ts @@ -21,7 +21,7 @@ describe('with-basepath', function() { it('serves /custom-basepath', async () => { await r.load('/custom-basepath'); - assert.equal( + assert.strictEqual( await r.text('h1'), 'Great success!' ); @@ -30,7 +30,7 @@ describe('with-basepath', function() { it('emits a basepath message', async () => { await r.load('/custom-basepath'); - assert.deepEqual(r.messages, [{ + assert.deepStrictEqual(r.messages, [{ __sapper__: true, event: 'basepath', basepath: '/custom-basepath' @@ -45,7 +45,7 @@ describe('with-basepath', function() { assert.ok(client_assets.length > 0); - assert.deepEqual(non_client_assets, [ + assert.deepStrictEqual(non_client_assets, [ 'custom-basepath/global.css', 'custom-basepath/index.html', 'custom-basepath/redirect-from/index.html', @@ -58,12 +58,12 @@ describe('with-basepath', function() { it('redirects on server', async () => { await r.load('/custom-basepath/redirect-from'); - assert.equal( + assert.strictEqual( r.page.url(), `${r.base}/custom-basepath/redirect-to` ); - assert.equal( + assert.strictEqual( await r.text('h1'), 'redirected' ); @@ -77,18 +77,18 @@ describe('with-basepath', function() { await r.page.click('[href="redirect-from"]'); await r.wait(); - assert.equal( + assert.strictEqual( r.page.url(), `${r.base}/custom-basepath/redirect-to` ); - assert.equal( + assert.strictEqual( await r.text('h1'), 'redirected' ); }); it('survives the tests with no server errors', () => { - assert.deepEqual(r.errors, []); + assert.deepStrictEqual(r.errors, []); }); }); diff --git a/test/apps/with-sourcemaps-webpack/test.ts b/test/apps/with-sourcemaps-webpack/test.ts index 194e9ef20..a55800dd2 100644 --- a/test/apps/with-sourcemaps-webpack/test.ts +++ b/test/apps/with-sourcemaps-webpack/test.ts @@ -15,7 +15,7 @@ describe('with-sourcemaps-webpack', function() { const shell_source = /shell = (\[[\s\S]+?\])/.exec(service_worker_source)[1]; const shell = JSON.parse(shell_source); - assert.equal(shell.filter(_ => _.endsWith('.map')).length, 0, + assert.strictEqual(shell.filter(_ => _.endsWith('.map')).length, 0, 'sourcemap files are not cached in SW'); const clientShellDir = path.resolve(`${__dirname}/__sapper__/build`, path.dirname(shell[0]).replace(/^\//, ''));