-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParser Testers.js
53 lines (46 loc) · 1.58 KB
/
Parser Testers.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
//// These are just testers for the script's parse functions
var categoryNames = Object.keys (categories);
function testParseCategory0 () {
var categoryName = categoryNames [0];
var categoryURL = categories [categoryName];
var test = parseCategory (categoryURL);
for (var index = 0; index < test.length; index++ ) {
var opportunity = test [index];
opportunity = parseOpportunity (opportunity, categoryName);
test [index] = opportunity;
}
Logger.log (test);
}
function testParseCategory1 () {
var categoryName = categoryNames [1];
var categoryURL = categories [categoryName];
var test = parseCategory (categoryURL);
for (var index = 0; index < test.length; index++ ) {
var opportunity = test [index];
opportunity = parseOpportunity (opportunity, categoryName);
test [index] = opportunity;
}
Logger.log (test);
}
function testParseCategory2 () {
var categoryName = categoryNames [2];
var categoryURL = categories [categoryName];
var test = parseCategory (categoryURL);
for (var index = 0; index < test.length; index++ ) {
var opportunity = test [index];
opportunity = parseOpportunity (opportunity, categoryName);
test [index] = opportunity;
}
Logger.log (test);
}
function testParseCategory3 () {
var categoryName = categoryNames [3];
var categoryURL = categories [categoryName];
var test = parseCategory (categoryURL);
for (var index = 0; index < test.length; index++ ) {
var opportunity = test [index];
opportunity = parseOpportunity (opportunity, categoryName);
test [index] = opportunity;
}
Logger.log (test);
}