@@ -8,71 +8,75 @@ var config = require('./util/patternlab-config.json');
8
8
9
9
patternEngines . loadAllEngines ( config ) ;
10
10
11
- // the mustache test pattern, stolen from object_factory unit tests
12
- var mustacheTestPattern = new Pattern (
11
+ // the handlebars test pattern, stolen from object_factory unit tests
12
+ var handlebarsTestPattern = new Pattern (
13
13
'source/_patterns/atoms/global/colors-alt.hbs' ,
14
14
{ d : 123 }
15
15
) ;
16
- var mustacheTestPseudoPatternBasePattern = new Pattern (
16
+ var handlebarsTestPseudoPatternBasePattern = new Pattern (
17
17
'source/_patterns/pages/homepage.hbs' ,
18
18
{ d : 123 }
19
19
) ;
20
- var mustacheTestPseudoPattern = new Pattern (
20
+ var handlebarsTestPseudoPattern = new Pattern (
21
21
'source/_patterns/pages/homepage~emergency.json' ,
22
22
{ d : 123 }
23
23
) ;
24
- mustacheTestPseudoPattern . isPseudoPattern = true ;
25
- mustacheTestPseudoPattern . basePattern = mustacheTestPseudoPatternBasePattern ;
24
+ handlebarsTestPseudoPattern . isPseudoPattern = true ;
25
+ handlebarsTestPseudoPattern . basePattern =
26
+ handlebarsTestPseudoPatternBasePattern ;
26
27
var engineNames = Object . keys ( patternEngines ) ;
27
28
28
29
tap . test (
29
- 'getEngineNameForPattern returns "mustache " from test pattern' ,
30
+ 'getEngineNameForPattern returns "handlebars " from test pattern' ,
30
31
function ( test ) {
31
- var engineName =
32
- patternEngines . getEngineNameForPattern ( mustacheTestPattern ) ;
33
- test . equal ( engineName , 'mustache' ) ;
32
+ var engineName = patternEngines . getEngineNameForPattern (
33
+ handlebarsTestPattern
34
+ ) ;
35
+ test . equal ( engineName , 'handlebars' ) ;
34
36
test . end ( ) ;
35
37
}
36
38
) ;
37
39
38
40
tap . test (
39
- 'getEngineNameForPattern returns "mustache " for a plain string template as a backwards compatibility measure' ,
41
+ 'getEngineNameForPattern returns "handlebars " for a plain string template as a backwards compatibility measure' ,
40
42
function ( test ) {
41
43
test . plan ( 1 ) ;
42
44
test . equal (
43
45
patternEngines . getEngineNameForPattern ( 'plain text string' ) ,
44
- 'mustache '
46
+ 'handlebars '
45
47
) ;
46
48
test . end ( ) ;
47
49
}
48
50
) ;
49
51
50
52
tap . test (
51
- 'getEngineNameForPattern returns "mustache " for an artificial empty template' ,
53
+ 'getEngineNameForPattern returns "handlebars " for an artificial empty template' ,
52
54
function ( test ) {
53
55
test . plan ( 1 ) ;
54
56
var emptyPattern = Pattern . createEmpty ( ) ;
55
57
test . equal (
56
58
patternEngines . getEngineNameForPattern ( emptyPattern ) ,
57
- 'mustache '
59
+ 'handlebars '
58
60
) ;
59
61
test . end ( ) ;
60
62
}
61
63
) ;
62
64
63
65
tap . test (
64
- 'getEngineForPattern returns a reference to the mustache engine from test pattern' ,
66
+ 'getEngineForPattern returns a reference to the handlebars engine from test pattern' ,
65
67
function ( test ) {
66
- var engine = patternEngines . getEngineForPattern ( mustacheTestPattern ) ;
68
+ var engine = patternEngines . getEngineForPattern ( handlebarsTestPattern ) ;
67
69
test . equal ( engine , patternEngines . hbs ) ;
68
70
test . end ( ) ;
69
71
}
70
72
) ;
71
73
72
74
tap . test (
73
- 'getEngineForPattern returns a reference to the mustache engine from test pseudo-pattern' ,
75
+ 'getEngineForPattern returns a reference to the handlebars engine from test pseudo-pattern' ,
74
76
function ( test ) {
75
- var engine = patternEngines . getEngineForPattern ( mustacheTestPseudoPattern ) ;
77
+ var engine = patternEngines . getEngineForPattern (
78
+ handlebarsTestPseudoPattern
79
+ ) ;
76
80
test . equal ( engine , patternEngines . hbs ) ;
77
81
test . end ( ) ;
78
82
}
@@ -189,10 +193,10 @@ function testProps(object, propTests, test) {
189
193
}
190
194
191
195
tap . test (
192
- 'patternEngines object contains at least the default mustache engine' ,
196
+ 'patternEngines object contains at least the default handlebars engine' ,
193
197
function ( test ) {
194
198
test . plan ( 1 ) ;
195
- test . ok ( patternEngines . hasOwnProperty ( 'mustache ' ) ) ;
199
+ test . ok ( patternEngines . hasOwnProperty ( 'handlebars ' ) ) ;
196
200
test . end ( ) ;
197
201
}
198
202
) ;
0 commit comments