11const Sax = require ( 'sax' ) ;
2- const _ = require ( '../../../utils/under-dash' ) ;
2+ const { cloneDeep , each } = require ( '../../../utils/under-dash' ) ;
33
44const XmlStream = verquire ( 'utils/xml-stream' ) ;
55const CompositeXform = verquire ( 'xlsx/xform/composite-xform' ) ;
@@ -9,7 +9,7 @@ function getExpectation(expectation, name) {
99 if ( ! expectation . hasOwnProperty ( name ) ) {
1010 throw new Error ( `Expectation missing required field: ${ name } ` ) ;
1111 }
12- return _ . cloneDeep ( expectation [ name ] ) ;
12+ return cloneDeep ( expectation [ name ] ) ;
1313}
1414
1515// ===============================================================================================================
@@ -28,7 +28,7 @@ const its = {
2828
2929 const xform = expectation . create ( ) ;
3030 xform . prepare ( model , expectation . options ) ;
31- expect ( _ . cloneDeep ( model ) ) . to . deep . equal ( result ) ;
31+ expect ( cloneDeep ( model , false ) ) . to . deep . equal ( result ) ;
3232 resolve ( ) ;
3333 } ) ) ;
3434 } ,
@@ -137,7 +137,7 @@ const its = {
137137 // console.log('expected Model', JSON.stringify(result));
138138
139139 // eliminate the undefined
140- const clone = _ . cloneDeep ( model , false ) ;
140+ const clone = cloneDeep ( model , false ) ;
141141
142142 // console.log('result', JSON.stringify(clone));
143143 // console.log('expect', JSON.stringify(result));
@@ -162,7 +162,7 @@ const its = {
162162 . parse ( parser )
163163 . then ( model => {
164164 // eliminate the undefined
165- const clone = _ . cloneDeep ( model , false ) ;
165+ const clone = cloneDeep ( model , false ) ;
166166
167167 // console.log('result', JSON.stringify(clone));
168168 // console.log('expect', JSON.stringify(result));
@@ -185,7 +185,7 @@ const its = {
185185 xform . reconcile ( model , expectation . options ) ;
186186
187187 // eliminate the undefined
188- const clone = _ . cloneDeep ( model , false ) ;
188+ const clone = cloneDeep ( model , false ) ;
189189
190190 expect ( clone ) . to . deep . equal ( result ) ;
191191 resolve ( ) ;
@@ -194,10 +194,10 @@ const its = {
194194} ;
195195
196196function testXform ( expectations ) {
197- _ . each ( expectations , expectation => {
197+ each ( expectations , expectation => {
198198 const tests = getExpectation ( expectation , 'tests' ) ;
199199 describe ( expectation . title , ( ) => {
200- _ . each ( tests , test => {
200+ each ( tests , test => {
201201 its [ test ] ( expectation ) ;
202202 } ) ;
203203 } ) ;
0 commit comments