mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore: lint
This commit is contained in:
parent
1679b788c2
commit
5f0391fc44
7 changed files with 30 additions and 32 deletions
|
|
@ -6,16 +6,16 @@ const {btoa, atob} = require('./base64');
|
|||
|
||||
test('btoa: browser', (t) => {
|
||||
const btoaOriginal = global.btoa;
|
||||
const btoaStub = stub();
|
||||
const str = 'hello';
|
||||
|
||||
global.btoa = stub();
|
||||
global.btoa = btoaStub;
|
||||
|
||||
btoa(str);
|
||||
|
||||
t.calledWith(global.btoa, [str], 'should call global.btoa');
|
||||
t.end();
|
||||
|
||||
global.btoa = btoaOriginal;
|
||||
|
||||
t.calledWith(btoaStub, [str], 'should call global.btoa');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('btoa: node', (t) => {
|
||||
|
|
@ -30,16 +30,18 @@ test('btoa: node', (t) => {
|
|||
|
||||
test('atob: browser', (t) => {
|
||||
const atobOriginal = global.atob;
|
||||
const atobStub = stub();
|
||||
|
||||
const str = 'hello';
|
||||
|
||||
global.atob = stub();
|
||||
global.atob = atobStub;
|
||||
|
||||
atob(str);
|
||||
|
||||
t.calledWith(global.atob, [str], 'should call global.btoa');
|
||||
t.end();
|
||||
|
||||
global.atob = atobOriginal;
|
||||
|
||||
t.calledWith(atobStub, [str], 'should call global.btoa');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('atob: node', (t) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue