From 3e0d96d58432c3646ca00982e07b1526af6573e7 Mon Sep 17 00:00:00 2001 From: Walter Moar Date: Wed, 18 Dec 2024 00:03:18 +0000 Subject: [PATCH] test: fix node 20 complaint about setting global --- .../designer/settings/FormEventStreamSettings.spec.js | 4 ---- app/frontend/vite.config.mjs | 2 -- 2 files changed, 6 deletions(-) diff --git a/app/frontend/tests/unit/components/designer/settings/FormEventStreamSettings.spec.js b/app/frontend/tests/unit/components/designer/settings/FormEventStreamSettings.spec.js index f52009267..1993ffd76 100644 --- a/app/frontend/tests/unit/components/designer/settings/FormEventStreamSettings.spec.js +++ b/app/frontend/tests/unit/components/designer/settings/FormEventStreamSettings.spec.js @@ -8,10 +8,6 @@ import { useFormStore } from '~/store/form'; import FormEventStreamSettings from '~/components/designer/settings/FormEventStreamSettings.vue'; describe('FormEventStreamSettings.vue', () => { - const crypto = require('crypto').webcrypto; - // Shims the crypto property onto global - global.crypto = crypto; - const pinia = createTestingPinia(); setActivePinia(pinia); diff --git a/app/frontend/vite.config.mjs b/app/frontend/vite.config.mjs index baab82126..d8fa83e94 100644 --- a/app/frontend/vite.config.mjs +++ b/app/frontend/vite.config.mjs @@ -33,8 +33,6 @@ export default defineConfig(({ command, mode }) => { '~formiojs': resolve(__dirname, './node_modules/formiojs'), '~font-awesome': resolve(__dirname, './node_modules/font-awesome'), '~vuetify': resolve(__dirname, './node_modules/vuetify'), - // no clue why crypto is required, but unit tests will not run without it - crypto: 'crypto-js', }, }, test: {