mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-04-20 22:05:35 -04:00
test: use cleanup function everywhere instead of jsdom manually
This commit is contained in:
@@ -15,7 +15,7 @@ describe('CryptTool', function () {
|
||||
'string',
|
||||
'string',
|
||||
async function (key, password, message) {
|
||||
const clean = jsdom();
|
||||
const clean = globalThis.cleanup();
|
||||
// ensure zlib is getting loaded
|
||||
PrivateBin.Controller.initZ();
|
||||
Object.defineProperty(window, 'crypto', {
|
||||
@@ -42,7 +42,7 @@ describe('CryptTool', function () {
|
||||
|
||||
it('does not truncate messages', async function () {
|
||||
const message = fs.readFileSync('test/compression-sample.txt', 'ascii').trim(),
|
||||
clean = jsdom();
|
||||
clean = globalThis.cleanup();
|
||||
Object.defineProperty(window, 'crypto', {
|
||||
value: new WebCrypto(),
|
||||
writeable: false
|
||||
@@ -91,7 +91,7 @@ isWhile : interp (while expr sBody) (MemElem mem) =
|
||||
======================== ( 1 / 1 )
|
||||
conseq_or_bottom inv (interp (nth_iterate sBody n) (MemElem mem))
|
||||
`;
|
||||
const clean = jsdom();
|
||||
const clean = globalThis.cleanup();
|
||||
// ensure zlib is getting loaded
|
||||
PrivateBin.Controller.initZ();
|
||||
Object.defineProperty(window, 'crypto', {
|
||||
@@ -123,7 +123,7 @@ conseq_or_bottom inv (interp (nth_iterate sBody n) (MemElem mem))
|
||||
jsc.assert(jsc.forall(
|
||||
'integer',
|
||||
function(counter) {
|
||||
const clean = jsdom();
|
||||
const clean = globalThis.cleanup();
|
||||
Object.defineProperty(window, 'crypto', {
|
||||
value: new WebCrypto(),
|
||||
writeable: false
|
||||
|
||||
Reference in New Issue
Block a user