File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
packages/@vue/cli/lib/util/__tests__ Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 11const 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+
39test ( `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}
5157module.exports = config`
52- expect ( extend ( value , source ) ) . toMatch (
58+ assertMatch ( extend ( value , source ) ,
5359 `const config = {
5460 bar: 123,
5561 foo: true
You can’t perform that action at this time.
0 commit comments