(o, t)
| 79 | |
| 80 | // Typeof |
| 81 | function testTypeOf(o, t) { |
| 82 | let types = ['number', 'string', 'symbol', 'boolean', 'bigint', 'undefined', |
| 83 | 'function', 'object']; |
| 84 | assertEquals(t, eval('run(()=>typeof ' + o + ')'), |
| 85 | `(()=>typeof ${o})() == ${t}`); |
| 86 | assertTrue(eval('run(()=>typeof ' + o + ' == "' + t + '")'), |
| 87 | `typeof ${o} == ${t}`); |
| 88 | var other_types = types.filter((x) => x !== t); |
| 89 | for (var other of other_types) { |
| 90 | assertFalse(eval('run(()=>typeof ' + o + ' == "' + other + '")'), |
| 91 | `typeof ${o} != ${other}`); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | testTypeOf('undefined', 'undefined'); |
| 96 | testTypeOf('null', 'object'); |
no test coverage detected