@@ -8,6 +8,7 @@ const buildListItems = require('../core/lib/buildListItems');
8
8
const pa = require ( '../core/lib/pattern_assembler' ) ;
9
9
const pattern_assembler = new pa ( ) ;
10
10
const engineLoader = require ( '../core/lib/pattern_engines' ) ;
11
+ const getPartial = require ( '../core/lib/get' ) ;
11
12
const processRecursive = require ( '../core/lib/processRecursive' ) ;
12
13
const processIterative = require ( '../core/lib/processIterative' ) ;
13
14
@@ -237,28 +238,37 @@ tap.test('processRecursive - ensure deep-nesting works', function (test) {
237
238
var p2 = processIterative ( templatePattern , patternlab ) ;
238
239
var p3 = processIterative ( pagesPattern , patternlab ) ;
239
240
240
- Promise . all ( [ p1 , p2 , p3 ] ) . then ( ( ) => {
241
+ return Promise . all ( [
242
+ p1 ,
243
+ p2 ,
244
+ p3 ,
245
+ processRecursive ( atomPath , patternlab ) ,
246
+ processRecursive ( templatePath , patternlab ) ,
247
+ processRecursive ( pagesPath , patternlab )
248
+ ] ) . then ( ( ) => {
241
249
//act
242
- processRecursive ( pagesPath , patternlab ) . then ( ( ) => {
250
+ return test . test ( 'processRecursive - ensure deep-nesting works2' , function ( tt ) {
243
251
//assert
244
252
const expectedCleanValue = 'bar' ;
245
253
const expectedSetValue = 'bar' ;
246
254
247
255
//this is the "atom" - it should remain unchanged
248
- test . equals ( util . sanitized ( atomPattern . template ) , expectedCleanValue ) ;
249
- test . equals ( util . sanitized ( atomPattern . extendedTemplate ) , expectedCleanValue ) ;
256
+ tt . equals ( util . sanitized ( atomPattern . template ) , expectedCleanValue ) ;
257
+ tt . equals ( util . sanitized ( atomPattern . extendedTemplate ) , expectedCleanValue ) ;
250
258
251
259
//this is the "template pattern" - it should have an updated extendedTemplate but an unchanged template
252
- test . equals ( util . sanitized ( templatePattern . template ) , '{{> test-bar }}' ) ;
253
- test . equals ( util . sanitized ( templatePattern . extendedTemplate ) , expectedSetValue ) ;
260
+ tt . equals ( util . sanitized ( templatePattern . template ) , '{{> test-bar }}' ) ;
261
+ tt . equals ( util . sanitized ( templatePattern . extendedTemplate ) , expectedSetValue ) ;
254
262
255
263
//this is the "pages pattern" - it should have an updated extendedTemplate equal to the template pattern but an unchanged template
256
- test . equals ( util . sanitized ( pagesPattern . template ) , '{{> test-foo }}' ) ;
257
- test . equals ( util . sanitized ( pagesPattern . extendedTemplate ) , expectedSetValue ) ;
264
+ tt . equals ( util . sanitized ( pagesPattern . template ) , '{{> test-foo }}' ) ;
265
+ tt . equals ( util . sanitized ( pagesPattern . extendedTemplate ) , expectedSetValue ) ;
266
+ tt . end ( ) ;
258
267
test . end ( ) ;
259
- } ) . catch ( test . threw ) ;
260
- } ) . catch ( test . threw ) ;
261
- } ) ;
268
+ } ) ;
269
+
270
+ } )
271
+ } ) . catch ( tap . threw ) ;
262
272
263
273
tap . test ( 'processRecursive - 685 ensure listitems data is used' , function ( test ) {
264
274
//arrange
0 commit comments