Skip to content

Commit d3242f6

Browse files
committed
test: update tests for new execa major
1 parent 24da579 commit d3242f6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,31 +52,31 @@ test('bad', async (t) => {
5252
try {
5353
await run('--config', 'bad.config.js');
5454
} catch (err) {
55-
t.truthy(err.message.includes('WebpackOptionsValidationError'));
55+
t.truthy(err.stderr.includes('WebpackOptionsValidationError'));
5656
}
5757
});
5858

5959
test('bad --config.name', async (t) => {
6060
try {
6161
await run('--config.ye', 'multi.config.js');
6262
} catch (err) {
63-
t.truthy(err.message.includes('RangeError'));
63+
t.truthy(err.stderr.includes('RangeError'));
6464
}
6565
});
6666

6767
test('bad --config.name, non-Array', async (t) => {
6868
try {
6969
await run('--config.ye', 'webpack.config.js');
7070
} catch (err) {
71-
t.truthy(err.message.includes('TypeError'));
71+
t.truthy(err.stderr.includes('TypeError'));
7272
}
7373
});
7474

7575
test('bail', async (t) => {
7676
try {
7777
await run('--config', 'bail.config.js');
7878
} catch (err) {
79-
t.truthy(err.message.includes('⬢ webpack: ModuleNotFoundError'));
79+
t.truthy(err.stderr.includes('⬢ webpack: ModuleNotFoundError'));
8080
}
8181
});
8282

@@ -107,14 +107,14 @@ test('watch', (t) => {
107107

108108
setTimeout(async () => {
109109
proc.kill();
110-
const { stderr } = await proc;
111-
t.truthy(stderr.includes('⬡ webpack: Watching Files'));
110+
const { all } = await proc;
111+
t.truthy(all.includes('⬡ webpack: Watching Files'));
112112
defer.resolve();
113113
}, 2000);
114114

115115
return defer.promise;
116116
});
117-
117+
//
118118
test('zero config', async (t) => {
119119
const { stderr } = await execa('node', [bin], { cwd: join(cwd, '/zero') });
120120
t.truthy(stderr.includes('⬡ webpack: Build Finished'));

0 commit comments

Comments
 (0)