Files
test-repo/tests/flow/object_is/object_is.js
T
Christopher Chedeau 3375cfe605 Move tests around (#454)
* new_tests

* move_all_clobbered_tests

* remove all the tests that no longer exist

* re-run flow tests

* Move all the flow tests to tests/flow and prettier to tests/

* Move prettier tests to their own folders

* Add jsfmt files

* run prettier snapshot tests
2017-01-24 14:35:37 -08:00

23 lines
506 B
JavaScript

Object.is(1, 1);
Object.is(1, 2);
Object.is(1, {});
Object.is(1, NaN);
Object.is(0, 0);
Object.is(0, -0);
Object.is(NaN, NaN);
Object.is({}, {});
var emptyObject = {};
var emptyArray = [];
Object.is(emptyObject, emptyObject);
Object.is(emptyArray, emptyArray);
Object.is(emptyObject, emptyArray);
var squared = x => x * x;
Object.is(squared, squared);
var a: boolean = Object.is('a', 'a');
var b: string = Object.is('a', 'a');
var c: boolean = Object.is('a');
var d: boolean = Object.is('a', 'b', 'c');