@@ -159,22 +159,18 @@ exports['lineage hunter '] = {
159
159
'cascade_pattern_states promotes a lower pattern state up to the consumer' : function ( test ) {
160
160
//arrange
161
161
var pl = createBasePatternLabObject ( ) ;
162
- pl . config . patternStates = {
163
- "test-foo" : "complete" ,
164
- "test-bar" : "inreview"
165
- } ;
166
162
167
163
var atomPattern = new of . Pattern ( '00-test/01-bar.mustache' ) ;
168
164
atomPattern . template = fs . readFileSync ( pl . config . paths . source . patterns + '00-test/01-bar.mustache' , 'utf8' ) ;
169
165
atomPattern . extendedTemplate = atomPattern . template ;
166
+ atomPattern . patternState = "inreview" ;
170
167
171
- pattern_assembler . setPatternState ( atomPattern , pl ) ;
172
168
pattern_assembler . addPattern ( atomPattern , pl ) ;
173
169
174
170
var consumerPattern = new of . Pattern ( '00-test/00-foo.mustache' ) ;
175
171
consumerPattern . template = fs . readFileSync ( pl . config . paths . source . patterns + '00-test/00-foo.mustache' , 'utf8' ) ;
176
172
consumerPattern . extendedTemplate = consumerPattern . template ;
177
- pattern_assembler . setPatternState ( consumerPattern , pl ) ;
173
+ consumerPattern . patternState = "complete" ;
178
174
pattern_assembler . addPattern ( consumerPattern , pl ) ;
179
175
180
176
lineage_hunter . find_lineage ( consumerPattern , pl ) ;
@@ -191,22 +187,18 @@ exports['lineage hunter '] = {
191
187
'cascade_pattern_states promotes a lower pattern state up to the consumers lineage' : function ( test ) {
192
188
//arrange
193
189
var pl = createBasePatternLabObject ( ) ;
194
- pl . config . patternStates = {
195
- "test-foo" : "complete" ,
196
- "test-bar" : "inreview"
197
- } ;
198
190
199
191
var atomPattern = new of . Pattern ( '00-test/01-bar.mustache' ) ;
200
192
atomPattern . template = fs . readFileSync ( pl . config . paths . source . patterns + '00-test/01-bar.mustache' , 'utf8' ) ;
201
193
atomPattern . extendedTemplate = atomPattern . template ;
194
+ atomPattern . patternState = "inreview" ;
202
195
203
- pattern_assembler . setPatternState ( atomPattern , pl ) ;
204
196
pattern_assembler . addPattern ( atomPattern , pl ) ;
205
197
206
198
var consumerPattern = new of . Pattern ( '00-test/00-foo.mustache' ) ;
207
199
consumerPattern . template = fs . readFileSync ( pl . config . paths . source . patterns + '00-test/00-foo.mustache' , 'utf8' ) ;
208
200
consumerPattern . extendedTemplate = consumerPattern . template ;
209
- pattern_assembler . setPatternState ( consumerPattern , pl ) ;
201
+ consumerPattern . patternState = "complete" ;
210
202
pattern_assembler . addPattern ( consumerPattern , pl ) ;
211
203
212
204
lineage_hunter . find_lineage ( consumerPattern , pl ) ;
@@ -223,22 +215,17 @@ exports['lineage hunter '] = {
223
215
'cascade_pattern_states sets the pattern state on any lineage patterns reverse lineage' : function ( test ) {
224
216
//arrange
225
217
var pl = createBasePatternLabObject ( ) ;
226
- pl . config . patternStates = {
227
- "test-foo" : "complete" ,
228
- "test-bar" : "inreview"
229
- } ;
230
218
231
219
var atomPattern = new of . Pattern ( '00-test/01-bar.mustache' ) ;
232
220
atomPattern . template = fs . readFileSync ( pl . config . paths . source . patterns + '00-test/01-bar.mustache' , 'utf8' ) ;
233
221
atomPattern . extendedTemplate = atomPattern . template ;
234
-
235
- pattern_assembler . setPatternState ( atomPattern , pl ) ;
222
+ atomPattern . patternState = "inreview" ;
236
223
pattern_assembler . addPattern ( atomPattern , pl ) ;
237
224
238
225
var consumerPattern = new of . Pattern ( '00-test/00-foo.mustache' ) ;
239
226
consumerPattern . template = fs . readFileSync ( pl . config . paths . source . patterns + '00-test/00-foo.mustache' , 'utf8' ) ;
240
227
consumerPattern . extendedTemplate = consumerPattern . template ;
241
- pattern_assembler . setPatternState ( consumerPattern , pl ) ;
228
+ consumerPattern . patternState = "complete" ;
242
229
pattern_assembler . addPattern ( consumerPattern , pl ) ;
243
230
244
231
lineage_hunter . find_lineage ( consumerPattern , pl ) ;
@@ -256,21 +243,17 @@ exports['lineage hunter '] = {
256
243
'cascade_pattern_states promotes lower pattern state when consumer does not have its own state' : function ( test ) {
257
244
//arrange
258
245
var pl = createBasePatternLabObject ( ) ;
259
- pl . config . patternStates = {
260
- "test-bar" : "inreview"
261
- } ;
262
246
263
247
var atomPattern = new of . Pattern ( '00-test/01-bar.mustache' ) ;
264
248
atomPattern . template = fs . readFileSync ( path . resolve ( pl . config . paths . source . patterns , '00-test/01-bar.mustache' ) , 'utf8' ) ;
265
249
atomPattern . extendedTemplate = atomPattern . template ;
250
+ atomPattern . patternState = "inreview" ;
266
251
267
- pattern_assembler . setPatternState ( atomPattern , pl ) ;
268
252
pattern_assembler . addPattern ( atomPattern , pl ) ;
269
253
270
254
var consumerPattern = new of . Pattern ( '00-test/00-foo.mustache' ) ;
271
255
consumerPattern . template = fs . readFileSync ( path . resolve ( pl . config . paths . source . patterns , '00-test/00-foo.mustache' ) , 'utf8' ) ;
272
256
consumerPattern . extendedTemplate = consumerPattern . template ;
273
- pattern_assembler . setPatternState ( consumerPattern , pl ) ;
274
257
pattern_assembler . addPattern ( consumerPattern , pl ) ;
275
258
276
259
lineage_hunter . find_lineage ( consumerPattern , pl ) ;
0 commit comments