-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcoreTests.js
35 lines (31 loc) · 965 Bytes
/
coreTests.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
const seedtext = require('./core.js');
console.log('\nStarting tests on core.js...\n');
var testsPassed = true; // CHANGE TO FALSE LATER ON
var passedTests,
failedTests = 0;
var failedTestsDescriptions = [];
// Fill with tests
// var test1 = seedtext.generateString()
// Fill with tests
// Fill with tests
// Fill with tests
// Fill with tests
// Fill with tests
// Fill with tests
// Fill with tests
// Fill with tests
// Fill with tests
// Fill with tests
// Fill with tests
// Fill with tests
// Fill with tests
console.log(`\nTests finished. Passed all tests: ${testsPassed}`);
// console.log(`\nSuccessful: ${passedTests},`);
// console.log(`\nUnsuccessful: ${failedTests}.\n`);
if (!testsPassed) {
for (let i = 0; i < failedTests; i++) {
console.log(`\n - Test failed. Reason: ${failedTestsDescriptions[i]}\n`);
}
console.log('\n');
throw new Error('Some of the tests for this module failed. See decription printed above.');
}