mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-11-29 10:37:32 -05:00
style(js): fix auto-fixable problems in JS test files
This commit is contained in:
parent
c2c1f37885
commit
cdbeaeb076
3 changed files with 7 additions and 7 deletions
|
|
@ -72,7 +72,7 @@ describe('Check', function () {
|
||||||
);
|
);
|
||||||
Object.defineProperty(window, 'crypto', {
|
Object.defineProperty(window, 'crypto', {
|
||||||
value: new WebCrypto(),
|
value: new WebCrypto(),
|
||||||
writeable: false,
|
writeable: false
|
||||||
});
|
});
|
||||||
Legacy.Check.init();
|
Legacy.Check.init();
|
||||||
const result1 = Legacy.Check.getInit() && Legacy.Check.getStatus(),
|
const result1 = Legacy.Check.getInit() && Legacy.Check.getStatus(),
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ describe('CryptTool', function () {
|
||||||
$.PrivateBin.Controller.initZ();
|
$.PrivateBin.Controller.initZ();
|
||||||
Object.defineProperty(window, 'crypto', {
|
Object.defineProperty(window, 'crypto', {
|
||||||
value: new WebCrypto(),
|
value: new WebCrypto(),
|
||||||
writeable: false,
|
writeable: false
|
||||||
});
|
});
|
||||||
global.atob = common.atob;
|
global.atob = common.atob;
|
||||||
global.btoa = common.btoa;
|
global.btoa = common.btoa;
|
||||||
|
|
@ -45,7 +45,7 @@ describe('CryptTool', function () {
|
||||||
clean = jsdom();
|
clean = jsdom();
|
||||||
Object.defineProperty(window, 'crypto', {
|
Object.defineProperty(window, 'crypto', {
|
||||||
value: new WebCrypto(),
|
value: new WebCrypto(),
|
||||||
writeable: false,
|
writeable: false
|
||||||
});
|
});
|
||||||
// ensure zlib is getting loaded
|
// ensure zlib is getting loaded
|
||||||
$.PrivateBin.Controller.initZ();
|
$.PrivateBin.Controller.initZ();
|
||||||
|
|
@ -96,7 +96,7 @@ conseq_or_bottom inv (interp (nth_iterate sBody n) (MemElem mem))
|
||||||
$.PrivateBin.Controller.initZ();
|
$.PrivateBin.Controller.initZ();
|
||||||
Object.defineProperty(window, 'crypto', {
|
Object.defineProperty(window, 'crypto', {
|
||||||
value: new WebCrypto(),
|
value: new WebCrypto(),
|
||||||
writeable: false,
|
writeable: false
|
||||||
});
|
});
|
||||||
const cipherMessage = await $.PrivateBin.CryptTool.cipher(
|
const cipherMessage = await $.PrivateBin.CryptTool.cipher(
|
||||||
key, password, message, []
|
key, password, message, []
|
||||||
|
|
@ -126,7 +126,7 @@ conseq_or_bottom inv (interp (nth_iterate sBody n) (MemElem mem))
|
||||||
const clean = jsdom();
|
const clean = jsdom();
|
||||||
Object.defineProperty(window, 'crypto', {
|
Object.defineProperty(window, 'crypto', {
|
||||||
value: new WebCrypto(),
|
value: new WebCrypto(),
|
||||||
writeable: false,
|
writeable: false
|
||||||
});
|
});
|
||||||
const key = $.PrivateBin.CryptTool.getSymmetricKey(),
|
const key = $.PrivateBin.CryptTool.getSymmetricKey(),
|
||||||
result = (key !== '' && keys.indexOf(key) === -1);
|
result = (key !== '' && keys.indexOf(key) === -1);
|
||||||
|
|
|
||||||
|
|
@ -533,7 +533,7 @@ describe('TopNav', function () {
|
||||||
path.basename(file_path),
|
path.basename(file_path),
|
||||||
{
|
{
|
||||||
lastModified,
|
lastModified,
|
||||||
type: mime.lookup(file_path) || '',
|
type: mime.lookup(file_path) || ''
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -550,7 +550,7 @@ describe('TopNav', function () {
|
||||||
|
|
||||||
Object.defineProperty(input, 'files', {
|
Object.defineProperty(input, 'files', {
|
||||||
value: file_list,
|
value: file_list,
|
||||||
writeable: false,
|
writeable: false
|
||||||
});
|
});
|
||||||
|
|
||||||
return input;
|
return input;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue