From 697407d6b4dd2c35876cd63a9562b334d4533e63 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 30 Nov 2019 12:49:00 +0000 Subject: [PATCH] test: pass array to allowedSources --- packages/config/test/options.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/config/test/options.test.js b/packages/config/test/options.test.js index 717680a6bd..4fb683e8c7 100644 --- a/packages/config/test/options.test.js +++ b/packages/config/test/options.test.js @@ -98,12 +98,12 @@ describe('config: options', () => { }) test('should enable csp', () => { - const { render: { csp } } = getNuxtConfig({ render: { csp: { allowedSources: true, test: true } } }) + const { render: { csp } } = getNuxtConfig({ render: { csp: { allowedSources: [], test: true } } }) expect(csp).toEqual({ hashAlgorithm: 'sha256', addMeta: false, unsafeInlineCompatibility: false, - allowedSources: true, + allowedSources: [], policies: undefined, reportOnly: false, test: true @@ -112,12 +112,12 @@ describe('config: options', () => { // TODO: Remove this test in Nuxt 3, we will stop supporting this typo (more on: https://github.com/nuxt/nuxt.js/pull/6583) test('should enable csp with old typo property name, avoiding breaking changes', () => { - const { render: { csp } } = getNuxtConfig({ render: { csp: { allowedSources: true, test: true, unsafeInlineCompatiblity: true } } }) + const { render: { csp } } = getNuxtConfig({ render: { csp: { allowedSources: [], test: true, unsafeInlineCompatiblity: true } } }) expect(csp).toEqual({ hashAlgorithm: 'sha256', addMeta: false, unsafeInlineCompatibility: true, - allowedSources: true, + allowedSources: [], policies: undefined, reportOnly: false, test: true