Skip to content

Commit 7fd5f25

Browse files
committed
test: fix test for windows
1 parent ada4022 commit 7fd5f25

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -453,14 +453,8 @@ test('api: addEntryImport & addEntryInjection', async () => {
453453
] })
454454

455455
await generator.generate()
456-
expect(fs.readFileSync('/main.js', 'utf-8')).toMatch(`import foo from 'foo'\nimport bar from 'bar'`)
457-
expect(fs.readFileSync('/main.js', 'utf-8')).toMatch(
458-
`new Vue({
459-
foo,
460-
bar,
461-
render: h => h(App)
462-
})`
463-
)
456+
expect(fs.readFileSync('/main.js', 'utf-8')).toMatch(/import foo from 'foo'\s+import bar from 'bar'/)
457+
expect(fs.readFileSync('/main.js', 'utf-8')).toMatch(/new Vue\({\s+foo,\s+bar,\s+render: h => h\(App\)\s+}\)/)
464458
})
465459

466460
test('extract config files', async () => {

0 commit comments

Comments
 (0)