-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
40 lines (34 loc) · 1013 Bytes
/
test.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
const grader = require('./dist/grader');
const gradeFile = grader.gradeFile_URL;
tests = [
// {
// 'file': 'https://raw.githubusercontent.com/phuongtung1/test_repo/master/test_mb/f0',
// 'question': 'assign_step1_ans',
// 'localTest': true,
// 'info': 'x'
// }
{
'file': 'https://raw.githubusercontent.com/phuongtung1/test_repo/master/test_mb/f1',
'question': 'w4_coding_assign_part2_ans',
'localTest': true,
'info': 'x'
}
]
// gradeFile(
// {
// 'file': 'https://raw.githubusercontent.com/phuongtung1/test_repo/master/W1test.mob',
// 'question': 'w1/w1',
// 'localTest': true,
// 'info': 'test'
// }
// ).then(r => {
// console.log(JSON.stringify(r))
// });
tests.forEach(element => {
gradeFile(
element
).then(r => {
console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!',r.score)
console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!',r.comment)
});
});