Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Commit 882aee2

Browse files
committed
streamline, DRY out and update unit tests
1 parent b03bc45 commit 882aee2

File tree

2 files changed

+115
-259
lines changed

2 files changed

+115
-259
lines changed

test/lineage_hunter_tests.js

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -104,30 +104,22 @@
104104
//setup current pattern from what we would have during execution
105105
var currentPattern = createFakeEmptyErrorPattern();
106106
extend(currentPattern, {
107-
"template": "{{> atoms-error(message: 'That\'s no moon...') }}",
108-
"patternPartial": "{{> atoms-error(message: 'That\'s no moon...') }}"
107+
"template": "{{> atoms-error(message: 'That\\'s no moon...') }}",
108+
"patternPartial": "{{> atoms-error(message: 'That\\'s no moon...') }}"
109109
});
110110

111111
var patternlab = {
112112
patterns: [
113-
{
114-
"name": "01-atoms-05-alerts-00-error",
115-
"subdir": "01-atoms\\05-alerts",
116-
"filename": "00-error.mustache",
117-
"data": null,
118-
"template": "<h1> {{message}} </h1>",
119-
"patternPartial": "<h1> {{message}} </h1>",
120-
"patternName": "error",
121-
"patternLink": "01-atoms-05-alerts-00-error/01-atoms-05-alerts-00-error.html",
122-
"patternGroup": "atoms",
123-
"patternSubGroup": "atoms\\05-alerts",
124-
"flatPatternPath": "01-atoms\\05-alerts",
125-
"patternState": "",
126-
"lineage": [],
127-
"lineageIndex": [],
128-
"lineageR": [],
129-
"lineageRIndex": []
130-
}
113+
of.oPattern.create(
114+
'/home/fakeuser/pl/source/_patterns/00-atoms/05-alerts/00-error.mustache',
115+
'00-atoms\\05-alerts',
116+
'00-error.mustache',
117+
null,
118+
{
119+
"template": "<h1> {{message}} </h1>",
120+
"patternPartial": "<h1> {{message}} </h1>"
121+
}
122+
)
131123
]
132124
};
133125

@@ -144,8 +136,8 @@
144136
//setup current pattern from what we would have during execution
145137
var currentPattern = createFakeEmptyErrorPattern();
146138
extend(currentPattern, {
147-
"template": "{{>atoms-error(message: 'That\'s no moon...')}}",
148-
"patternPartial": "{{>atoms-error(message: 'That\'s no moon...')}}",
139+
"template": "{{>atoms-error(message: 'That\\'s no moon...')}}",
140+
"patternPartial": "{{>atoms-error(message: 'That\\'s no moon...')}}",
149141
});
150142

151143
var patternlab = {
@@ -186,8 +178,8 @@
186178
//setup current pattern from what we would have during execution
187179
var currentPattern = createFakeEmptyErrorPattern();
188180
extend(currentPattern, {
189-
"template": "{{>atoms-error(message: 'That\'s no moon...')}}",
190-
"patternPartial": "{{>atoms-error(message: 'That\'s no moon...')}}"
181+
"template": "{{>atoms-error(message: 'That\\'s no moon...')}}",
182+
"patternPartial": "{{>atoms-error(message: 'That\\'s no moon...')}}"
191183
});
192184
var patternlab = {
193185
patterns: [

0 commit comments

Comments
 (0)