Skip to content

Commit 55cb4c0

Browse files
committed
test: attempt to fix multi line match for windows CI
1 parent dfb2583 commit 55cb4c0

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/@vue/cli/lib/util/__tests__/extendJSConfig.spec.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
const extend = require('../extendJSConfig')
22

3+
function assertMatch (source, expected) {
4+
source = source.split(/\n\r?/g)
5+
expected = expected.split(/\n\r?/g)
6+
expect(source).toEqual(expected)
7+
}
8+
39
test(`basic`, () => {
410
const value = {
511
foo: true,
@@ -14,7 +20,7 @@ test(`basic`, () => {
1420
modules: false
1521
}
1622
}`
17-
expect(extend(value, source)).toMatch(
23+
assertMatch(extend(value, source),
1824
`module.exports = {
1925
foo: true,
2026
css: {
@@ -32,7 +38,7 @@ test(`adding new property`, () => {
3238
`module.exports = {
3339
bar: 123
3440
}`
35-
expect(extend(value, source)).toMatch(
41+
assertMatch(extend(value, source),
3642
`module.exports = {
3743
bar: 123,
3844
foo: true
@@ -49,7 +55,7 @@ test(`non direct assignment`, () => {
4955
bar: 123
5056
}
5157
module.exports = config`
52-
expect(extend(value, source)).toMatch(
58+
assertMatch(extend(value, source),
5359
`const config = {
5460
bar: 123,
5561
foo: true

0 commit comments

Comments
 (0)