mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
18 lines
356 B
JavaScript
18 lines
356 B
JavaScript
var tests=0, testpass=0;
|
|
function t(x) {
|
|
console.log(x);
|
|
tests++;
|
|
if (x) testpass++;
|
|
}
|
|
|
|
|
|
t( typeof undefined === "undefined" );
|
|
t( typeof null === "object" );
|
|
t( typeof true === "boolean" );
|
|
t( typeof false === "boolean" );
|
|
t( typeof "foo" === "string" );
|
|
t( typeof 1 === "number" );
|
|
t( typeof function() {} === "function" );
|
|
|
|
result = tests==testpass;
|