Skip to content

Commit 2022de9

Browse files
committed
test: client: load-socket: coverage
1 parent e5e8d7c commit 2022de9

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

.madrun.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {run} from 'madrun';
22

33
export default {
4-
'test': () => `tape 'test/**/*.js'`,
4+
'test': () => `tape 'test/**/*.js' 'client/**/*.spec.js'`,
55
'lint': () => 'putout .',
66
'fresh:lint': () => run('lint', '--fresh'),
77
'lint:fresh': () => run('lint', '--fresh'),

client/load-socket.spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import {test} from 'supertape';
2+
import loadSocket from './load-socket.js';
3+
4+
test('fileop: client: load-socket: no io', async (t) => {
5+
globalThis.io = 'x';
6+
const io = await loadSocket();
7+
delete globalThis.io;
8+
9+
t.equal(io, 'x');
10+
t.end();
11+
})

0 commit comments

Comments
 (0)