You've already forked dev-sidecar
mirror of
https://github.com/docmirror/dev-sidecar.git
synced 2025-11-26 14:10:40 +08:00
代码格式调整:packages/core/**/*.js
This commit is contained in:
@@ -5,28 +5,28 @@ const mergeApi = require('../src/merge.js')
|
||||
const defConfig = {
|
||||
a: {
|
||||
aa: { value: 1 },
|
||||
bb: { value: 2 }
|
||||
bb: { value: 2 },
|
||||
},
|
||||
b: { c: 2 },
|
||||
c: 1,
|
||||
d: [1, 2, 3],
|
||||
e: {
|
||||
aa: 2,
|
||||
ee: 5
|
||||
ee: 5,
|
||||
},
|
||||
f: {
|
||||
x: 1
|
||||
x: 1,
|
||||
},
|
||||
g: [1, 2],
|
||||
h: null,
|
||||
i: null
|
||||
i: null,
|
||||
}
|
||||
|
||||
// 自定义配置
|
||||
const customConfig = {
|
||||
a: {
|
||||
bb: { value: 2 },
|
||||
cc: { value: 3 }
|
||||
cc: { value: 3 },
|
||||
},
|
||||
b: { c: 2 },
|
||||
c: null,
|
||||
@@ -34,11 +34,11 @@ const customConfig = {
|
||||
e: {
|
||||
aa: 2,
|
||||
ee: 5,
|
||||
ff: 6
|
||||
ff: 6,
|
||||
},
|
||||
f: {},
|
||||
g: [1, 2],
|
||||
h: null
|
||||
h: null,
|
||||
}
|
||||
|
||||
// doDiff
|
||||
@@ -49,16 +49,16 @@ console.log('\r')
|
||||
const doDiffExpect = {
|
||||
a: {
|
||||
aa: null,
|
||||
cc: { value: 3 }
|
||||
cc: { value: 3 },
|
||||
},
|
||||
c: null,
|
||||
d: [1, 2, 3, 4],
|
||||
e: {
|
||||
ff: 6
|
||||
ff: 6,
|
||||
},
|
||||
f: {
|
||||
x: null
|
||||
}
|
||||
x: null,
|
||||
},
|
||||
}
|
||||
console.log('check diff result:', lodash.isEqual(doDiffResult, doDiffExpect))
|
||||
console.log('\r')
|
||||
@@ -72,17 +72,17 @@ console.log('running:', JSON.stringify(doMergeResult, null, 2))
|
||||
const doMergeExpect = {
|
||||
a: {
|
||||
bb: { value: 2 },
|
||||
cc: { value: 3 }
|
||||
cc: { value: 3 },
|
||||
},
|
||||
b: { c: 2 },
|
||||
d: [1, 2, 3, 4],
|
||||
e: {
|
||||
aa: 2,
|
||||
ee: 5,
|
||||
ff: 6
|
||||
ff: 6,
|
||||
},
|
||||
f: {},
|
||||
g: [1, 2]
|
||||
g: [1, 2],
|
||||
}
|
||||
console.log('check merge result:', lodash.isEqual(doMergeResult, doMergeExpect))
|
||||
console.log('\r')
|
||||
|
||||
Reference in New Issue
Block a user