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

Commit de97ac3

Browse files
committed
Adding test fixtures and mocks
1 parent c2e42db commit de97ac3

File tree

3 files changed

+112
-0
lines changed

3 files changed

+112
-0
lines changed

test/fixtures/patternlab-config.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"paths" : {
3+
"source" : {
4+
"root": "./source/",
5+
"patterns" : "./source/_patterns/",
6+
"data" : "./source/_data/",
7+
"meta": "./source/_meta/",
8+
"annotations" : "./source/_annotations/",
9+
"styleguide" : "node_modules/styleguidekit-assets-default/dist/",
10+
"patternlabFiles" : "node_modules/styleguidekit-mustache-default/views/",
11+
"js" : "./source/js",
12+
"images" : "./source/images",
13+
"fonts" : "./source/fonts",
14+
"css" : "./source/css/"
15+
},
16+
"public" : {
17+
"root" : "./public/",
18+
"patterns" : "./public/patterns/",
19+
"data" : "./public/styleguide/data/",
20+
"annotations" : "./public/annotations/",
21+
"styleguide" : "./public/styleguide/",
22+
"js" : "./public/js",
23+
"images" : "./public/images",
24+
"fonts" : "./public/fonts",
25+
"css" : "./public/css"
26+
}
27+
},
28+
"styleGuideExcludes": [
29+
"templates",
30+
"pages"
31+
],
32+
"defaultPattern": "all",
33+
"cleanPublic" : false,
34+
"patternExtension": "mustache",
35+
"ignored-extensions" : ["scss", "DS_Store", "less"],
36+
"ignored-directories" : ["scss"],
37+
"debug": false,
38+
"ishControlsHide": {
39+
"s": false,
40+
"m": false,
41+
"l": false,
42+
"full": false,
43+
"random": false,
44+
"disco": false,
45+
"hay": true,
46+
"mqs": false,
47+
"find": false,
48+
"views-all": false,
49+
"views-annotations": false,
50+
"views-code": false,
51+
"views-new": false,
52+
"tools-all": false,
53+
"tools-docs": false
54+
},
55+
"ishMinimum": "240",
56+
"ishMaximum": "2600",
57+
"patternStateCascade": ["inprogress", "inreview", "complete"],
58+
"patternStates": {
59+
"molecules-single-comment" : "complete",
60+
"organisms-sticky-comment" : "inreview",
61+
"templates-article" : "complete"
62+
},
63+
"patternExportPatternPartials": [],
64+
"patternExportDirectory": "./pattern_exports/",
65+
"baseurl" : "",
66+
"cacheBust": true,
67+
"starterkitSubDir": "dist",
68+
"outputFileSuffixes": {
69+
"rendered": "",
70+
"rawTemplate": "",
71+
"markupOnly": ".markup-only"
72+
}
73+
}

test/mocks/browsersync.mock.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function browserSyncMock() {
2+
return {
3+
init: function () {
4+
return true;
5+
},
6+
reload: function () {
7+
return true;
8+
},
9+
use: function () {
10+
return true;
11+
},
12+
watch: function () {
13+
return true;
14+
}
15+
}
16+
}
17+
18+
module.exports = browserSyncMock;

test/mocks/patternlab.mock.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
function patternLabMock() {
2+
return {
3+
build: function () {
4+
return true;
5+
},
6+
help: function () {
7+
return true;
8+
},
9+
patternsonly: function () {
10+
return true;
11+
},
12+
liststarterkits: function () {
13+
return true;
14+
},
15+
loadstarterkit: function () {
16+
return true;
17+
}
18+
}
19+
}
20+
21+
module.exports = patternLabMock;

0 commit comments

Comments
 (0)