1- const extend = require ( '../extendJSConfig' )
1+ 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 )
3+ function extend ( value , source ) {
4+ return _extend ( value , source ) . replace ( / \r \n / g, '\n' )
75}
86
97test ( `basic` , ( ) => {
@@ -20,7 +18,7 @@ test(`basic`, () => {
2018 modules: false
2119 }
2220}`
23- assertMatch ( extend ( value , source ) ,
21+ expect ( extend ( value , source ) ) . toMatch (
2422 `module.exports = {
2523 foo: true,
2624 css: {
@@ -38,7 +36,7 @@ test(`adding new property`, () => {
3836`module.exports = {
3937 bar: 123
4038}`
41- assertMatch ( extend ( value , source ) ,
39+ expect ( extend ( value , source ) ) . toMatch (
4240 `module.exports = {
4341 bar: 123,
4442 foo: true
@@ -55,7 +53,7 @@ test(`non direct assignment`, () => {
5553 bar: 123
5654}
5755module.exports = config`
58- assertMatch ( extend ( value , source ) ,
56+ expect ( extend ( value , source ) ) . toMatch (
5957 `const config = {
6058 bar: 123,
6159 foo: true
0 commit comments