diff options
author | varjolintu <sami.vanttinen@protonmail.com> | 2022-06-24 09:56:52 +0300 |
---|---|---|
committer | varjolintu <sami.vanttinen@protonmail.com> | 2022-06-24 09:58:24 +0300 |
commit | 6b3d9918bad74a46603dfeb68504d7e3bf1c3074 (patch) | |
tree | 832f36a5f6065364f72358aee0cd73a36f6984db /tests | |
parent | fcd8c8a627f6a315284eb383537fd3adc9805add (diff) |
Update Playwright and fix vulnerabilities
Diffstat (limited to 'tests')
-rw-r--r-- | tests/content-script-tests.mjs (renamed from tests/content-script-tests.js) | 4 | ||||
-rw-r--r-- | tests/global-setup.js | 6 | ||||
-rw-r--r-- | tests/global-teardown.js | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/content-script-tests.js b/tests/content-script-tests.mjs index 7bb8e89..2c25e32 100644 --- a/tests/content-script-tests.js +++ b/tests/content-script-tests.mjs @@ -1,7 +1,7 @@ 'use strict'; -const { test, expect } = require('@playwright/test'); -const fileUrl = require('file-url'); +import { test, expect } from '@playwright/test'; +import fileUrl from 'file-url'; const DEST = 'keepassxc-browser/tests'; diff --git a/tests/global-setup.js b/tests/global-setup.js index 0411044..503a49d 100644 --- a/tests/global-setup.js +++ b/tests/global-setup.js @@ -1,9 +1,9 @@ -const fs = require('fs-extra'); +const fs = require('@npmcli/fs') const DEST = 'keepassxc-browser/tests'; module.exports = async config => { // Create a temporary directory and copy tests/* to keepassxc-browser/tests - await fs.ensureDir(DEST); - await fs.copy('./tests', DEST); + await fs.exists(DEST); + await fs.cp('./tests', DEST, { recursive: true }); }; diff --git a/tests/global-teardown.js b/tests/global-teardown.js index 65fc8bb..d281914 100644 --- a/tests/global-teardown.js +++ b/tests/global-teardown.js @@ -1,8 +1,8 @@ -const fs = require('fs-extra'); +const fs = require('@npmcli/fs') const DEST = 'keepassxc-browser/tests'; module.exports = async config => { // Delete previously created temporary directory. Comment for re-running tests manually inside the extension. - await fs.remove(DEST); + await fs.rm(DEST, { recursive: true }); }; |