Skip to content

Commit db2b8b9

Browse files
committed
test: fix
1 parent 0329699 commit db2b8b9

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ test('main', async t => {
1414
},
1515
plugins: [
1616
new GopeedPolyfillPlugin({
17-
excludeAliases: ['console'],
17+
excludeAliases: ['process'],
1818
}),
1919
],
2020
});
2121

2222
t.is(require('./dist/1.js'), 'Hello World');
2323

24-
// https://github.com/browserify/console-browserify/blob/f7eefc7c908c29d2e94954e5c6c1098e8c1028b4/index.js#L63
25-
t.false(fs.readFileSync('./dist/1.js').toString().includes('No such label: '));
24+
// https://github.com/defunctzombie/node-process/blob/77caa43cdaee4ea710aa14d11cea1705293c0ef3/browser.js#L16C8-L16C9
25+
t.false(fs.readFileSync('./dist/1.js').toString().includes('clearTimeout has not been defined'));
2626

2727
// https://github.com/feross/buffer/blob/master/index.js#L80
2828
t.true(fs.readFileSync('./dist/1.js').toString().includes('is invalid for option "size"'));
@@ -39,23 +39,23 @@ test('includeAliases', async t => {
3939
},
4040
plugins: [
4141
new GopeedPolyfillPlugin({
42-
includeAliases: ['console'],
42+
includeAliases: ['process'],
4343
}),
4444
],
4545
});
4646

4747
t.is(require('./dist/2.js'), 'Hello World');
4848

49-
// https://github.com/browserify/console-browserify/blob/f7eefc7c908c29d2e94954e5c6c1098e8c1028b4/index.js#L63
50-
t.true(fs.readFileSync('./dist/2.js').toString().includes('No such label: '));
49+
// https://github.com/defunctzombie/node-process/blob/77caa43cdaee4ea710aa14d11cea1705293c0ef3/browser.js#L16C8-L16C9
50+
t.true(fs.readFileSync('./dist/2.js').toString().includes('clearTimeout has not been defined'));
5151

5252
// https://github.com/feross/buffer/blob/master/index.js#L80
5353
t.false(fs.readFileSync('./dist/2.js').toString().includes('is invalid for option "size"'));
5454
});
5555

5656
test('includeAliases and excludeAliases used at the same time', t => {
5757
t.throws(() => new GopeedPolyfillPlugin({
58-
includeAliases: ['console'],
58+
includeAliases: ['process'],
5959
excludeAliases: ['crypto'],
6060
}), {instanceOf: Error});
6161
});

0 commit comments

Comments
 (0)