-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.js
58 lines (55 loc) · 3.09 KB
/
tests.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
var tests = [
{
group: "lib node-local.js",
buildup: ["rm -rf node_modules","mkdir node_modules","npm install prettydiff", "echo \"<a><b> <c/> </b></a>\" > node_modules/prettydiff/testa.txt", "echo \"<a><b> <d/> </b></a>\" > node_modules/prettydiff/testb.txt"],
teardown: ["rm -rf node_modules"],
units: [
{
group: "readmethod: screen",
units: [
{
check: "node node_modules/prettydiff/api/node-local.js source:\"<a><b> <c/> </b></a>\" readmethod:\"screen\" mode:\"beautify\"\n",
name: "Beautify markup.",
verify: "<a>\n <b>\n <c/>\n </b>\n</a>"
}, {
check: "node node_modules/prettydiff/api/node-local.js source:\"<a><b> <c/> </b></a>\" readmethod:\"screen\" mode:\"minify\"\n",
name: "Minify markup.",
verify: "<a><b> <c/> </b></a>"
}, {
check: "node node_modules/prettydiff/api/node-local.js source:\"<a><b> <c/> </b></a>\" readmethod:\"screen\" mode:\"parse\"\n",
name: "Parse markup.",
verify: "{\"token\":[\"<a>\",\"<b>\",\" \",\"<c/>\",\" \",\"</b>\",\"</a>\"],\"types\":[\"start\",\"start\",\"content\",\"singleton\",\"content\",\"end\",\"end\"]}"
}
]
},
{
group: "readmethod: filescreen",
units: [
{
check: "node node_modules/prettydiff/api/node-local.js source:\"node_modules/prettydiff/testa.txt\" readmethod:\"filescreen\" mode:\"beautify\"\n",
name: "Beautify markup.",
verify: "<a>\n <b>\n <c/>\n </b>\n</a>"
}, {
check: "node node_modules/prettydiff/api/node-local.js source:\"node_modules/prettydiff/testa.txt\" readmethod:\"filescreen\" mode:\"minify\"\n",
name: "Minify markup.",
verify: "<a><b> <c/> </b></a>"
}, {
check: "node node_modules/prettydiff/api/node-local.js source:\"node_modules/prettydiff/testa.txt\" readmethod:\"filescreen\" mode:\"parse\"\n",
name: "Parse markup.",
verify: "{\"token\":[\"<a>\",\"<b>\",\" \",\"<c/>\",\" \",\"</b>\",\"</a>\"],\"types\":[\"start\",\"start\",\"content\",\"singleton\",\"content\",\"end\",\"end\"]}"
}
]
},
{
check: "node node_modules/prettydiff/api/node-local.js source:\"node_modules/prettydiff/testa.txt\" readmethod:\"file\" mode:\"beautify\"\n",
name: "Verify readmethod:file throws error on missing output option",
verify: "Error: 'readmethod' is value 'file' and argument 'output' is empty"
}
]
}
];
//4256 - push beta
//4888 - new bug
//4889 - new bug
//4890 = new bug
exports.tests = tests;