-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtests.gs
47 lines (35 loc) · 1.06 KB
/
tests.gs
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
// test all functions
function testTester() {
testTracker();
testExport();
}
function testExport() {
textAAAExport();
testupdateGradeFormulas();
}
function testTracker() {
testGetStudentByEmail();
testCreateStudentFullInfo();
//testCreateStudentFromSheet();
}
function testLogIt() {
var meta = {'tag': arguments.callee.name, "dest": "L"};
var m = "Message";
var answer, test;
test = "(m) => Logger(m)";
answer = logIt(m);
if ( answer.dest != "L" ) throw "(m) => Logger";
if ( answer.text != "???> Message" ) throw test;
test = "intentional fnTag";
answer = logIt(m, meta);
if ( answer.dest != "L" ) throw "(m) => Logger";
if ( answer.text != "testLogIt> Message" ) throw test;
test = "output to Logger";
answer = logIt(m, meta);
if ( answer.dest != "L" ) throw "(m) => Logger";
if ( answer.text != "testLogIt> Message" ) throw test;
test = "override to console";
answer = logIt(m, meta, "C");
if ( answer.dest != "C" ) throw "(m) => Logger";
if ( answer.text != "testLogIt> Message" ) throw test;
}