Skip to content

Commit b682575

Browse files
committed
test: fix failing tests that due to async support in Generator
1 parent 74f629e commit b682575

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/@vue/cli/__tests__/Generator.spec.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,13 +456,16 @@ test('api: onCreateComplete', async () => {
456456
],
457457
afterInvokeCbs: cbs
458458
})
459+
460+
await generator.generate()
461+
459462
expect(cbs).toContain(fn)
460463
})
461464

462-
test('api: afterInvoke', () => {
465+
test('api: afterInvoke', async () => {
463466
const fn = () => {}
464467
const cbs = []
465-
new Generator('/', {
468+
const generator = new Generator('/', {
466469
plugins: [
467470
{
468471
id: 'test',

0 commit comments

Comments
 (0)