wip: code formatting nits continued

This commit is contained in:
jdalton
2023-09-16 22:59:56 -07:00
parent 0b28b7f7b6
commit b5c59317ea
421 changed files with 7354 additions and 9005 deletions

20
test/eq.spec.js Normal file
View File

@@ -0,0 +1,20 @@
import eq from '../src/eq';
describe('eq', () => {
it('should perform a `SameValueZero` comparison of two values', () => {
expect(eq()).toBe(true);
expect(eq(undefined)).toBe(true);
expect(eq(0, -0)).toBe(true);
expect(eq(NaN, NaN)).toBe(true);
expect(eq(1, 1)).toBe(true);
expect(eq(null, undefined)).toBe(false);
expect(eq(1, Object(1))).toBe(false);
expect(eq(1, '1')).toBe(false);
expect(eq(1, '1')).toBe(false);
const object = { a: 1 };
expect(eq(object, object)).toBe(true);
expect(eq(object, { a: 1 })).toBe(false);
});
});