-
Notifications
You must be signed in to change notification settings - Fork 2
/
test
executable file
·28 lines (26 loc) · 1.74 KB
/
test
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
#!/usr/bin/nodejs
let nanoTestFull=()=>{
let nanotest = require('./index.js').test;
let nanoTest = new nanotest(
{
'debugPrint':'normal'
}
);
let testTest = nanoTest.add('"1. ", (()=>{return "0"})(), "!==", "1"', ()=>{return '0';}, '!==', '1');
nanoTest.add('"1. ", (()=>{return "0"})(), "===", "1"', ()=>{return (nanoTest.value(testTest));}, '===', '0');
nanoTest.add('"2. ", (()=>{return "0"})(), "!=", 1', ()=>{return nanoTest.value('ta');}, '===', false);
nanoTest.add('"3. ", (()=>{return "0"})(), "==", "0"', ()=>{return nanoTest.setup().get('debugPrint');}, '===', 'normal');
nanoTest.add('"4. ", (()=>{return "0"})(), "!==", "0"', ()=>{return '0';}, '!==', 0);
nanoTest.add('"5. ", (()=>{return "0"})(), "===", 0', ()=>{return 0;}, '===', 0);
nanoTest.add('"6. ", (()=>{return "0"})(), "<", 1', ()=>{return '0';}, '<', 1);
nanoTest.add('"7. ", (()=>{return "0"})(), ">", -1', ()=>{return '0';}, '>', -1);
nanoTest.add('"8. ", (()=>{return "1"})(), "==", "1"', ()=>{return '1';}, '==', '1');
nanoTest.add('"9. ", (()=>{return "0"})(), "==", 1', ()=>{return '0';}, '!=', 1);
nanoTest.add('"10.", (()=>{return "0"})(), "<", "1"', ()=>{return '0';}, '<', '1');
nanoTest.add('"11.", (()=>{return "1"})(), ">", "0"', ()=>{return '1';}, '>', '0');
nanoTest.add('"12.", (()=>{return {0:1}})(), "j===", {0:1}', ()=>{return {0:1};}, 'j===', {0:1});
nanoTest.add('"13.", (()=>{return {0:1}})(), "j==", {0:1}', ()=>{return {0:1};}, 'j==', {0:1});
nanoTest.add('"14.", (()=>{return {0:1}})(), "!=", {0:1}', ()=>{return {0:1};}, '!=', {0:1});
nanoTest.run();
};
nanoTestFull();