Skip to content

Commit 866eeaa

Browse files
committed
Merge branch 'dev' into ui-rewrite
2 parents 1c10a2d + c9714f5 commit 866eeaa

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

test/engine_underscore_tests.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ exports['engine_underscore'] = {
7272
// test
7373
test.equals(helloWorldWithData.render(), 'Hello world!' + eol + 'Yeah, we got the subtitle from the JSON.' + eol);
7474
test.done();
75+
},
76+
'findPartial return the ID of the partial, given a whole partial call': function (test) {
77+
var engineLoader = require('../core/lib/pattern_engines');
78+
var underscoreEngine = engineLoader.underscore;
79+
80+
test.expect(1);
81+
82+
// do all the normal processing of the pattern
83+
// test
84+
test.equals(underscoreEngine.findPartial("<%= _.renderNamedPartial('molecules-details', obj) %>"), 'molecules-details');
85+
test.done();
7586
}
7687
};
7788

test/list_item_hunter_tests.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,24 +151,28 @@
151151
var pattern1 = createFakeListPattern({
152152
"template": "{{#listItems.one}}{{> 00-test/00-foo.mustache }}{{/listItems.one}}",
153153
"extendedTemplate" : "{{#listItems.one}}{{> 00-test/00-foo.mustache }}{{/listItems.one}}",
154-
"key": "test-patternName1"
154+
"patternPartial": "test-patternName1",
155+
"relPath": "00-test/02-patternName1.mustache"
155156
});
156157

157158
var pattern2 = createFakeListPattern({
158159
"template": "{{#listItems.two}}{{> 00-test/00-bar.mustache }}{{/listItems.two}}",
159160
"extendedTemplate" : "{{#listItems.two}}{{> 00-test/00-bar.mustache }}{{/listItems.two}}",
160-
"key": "test-patternName2"
161+
"patternPartial": "test-patternName2",
162+
"relPath": "00-test/03-patternName2.mustache"
161163
});
162164

163165
var patternlab = createFakePatternLab({
164166
"patterns": [
165167
Pattern.create('00-test/00-foo.mustache', null, {
166168
"template": "{{ title }}",
167-
"extendedTemplate": "{{ title }}"
169+
"extendedTemplate": "{{ title }}",
170+
"relPath": "00-test/00-foo.mustache"
168171
}),
169172
Pattern.create('00-test/00-bar.mustache', null, {
170173
"template": "{{ title }}",
171-
"extendedTemplate": "{{ title }}"
174+
"extendedTemplate": "{{ title }}",
175+
"relPath": "00-test/00-bar.mustache"
172176
})
173177
]
174178
});

0 commit comments

Comments
 (0)