mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
wip: code formatting nits continued
This commit is contained in:
20
test/eq.spec.js
Normal file
20
test/eq.spec.js
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user