Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
WillBrock committed May 27, 2018
1 parent bd741e6 commit 6eab8cb
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/expect/src/__tests__/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
'use strict';

const {stringify} = require('jest-matcher-utils');
const {emptyObject, getObjectSubset, getPath, subsetEquality} = require('../utils');
const {
emptyObject,
getObjectSubset,
getPath,
subsetEquality,
} = require('../utils');

describe('getPath()', () => {
test('property exists', () => {
Expand Down Expand Up @@ -125,23 +130,23 @@ describe('emptyObject()', () => {

describe('subsetEquality()', () => {
test('matching object returns true', () => {
expect(subsetEquality({foo : 'bar'}, {foo: 'bar'})).toBe(true);
expect(subsetEquality({foo: 'bar'}, {foo: 'bar'})).toBe(true);
});

test('object without keys is undefined', () => {
expect(subsetEquality('foo', 'bar')).toBe(undefined);
});

test('objects to not match', () => {
expect(subsetEquality({foo : 'bar'}, {foo : 'baz'})).toBe(false);
expect(subsetEquality('foo', {foo : 'baz'})).toBe(false);
expect(subsetEquality({foo: 'bar'}, {foo: 'baz'})).toBe(false);
expect(subsetEquality('foo', {foo: 'baz'})).toBe(false);
});

test('null does not return errors', () => {
expect(subsetEquality(null, {foo : 'bar'})).not.toBeTruthy();
expect(subsetEquality(null, {foo: 'bar'})).not.toBeTruthy();
});

test('undefined does not return errors', () => {
expect(subsetEquality(undefined, {foo : 'bar'})).not.toBeTruthy();
expect(subsetEquality(undefined, {foo: 'bar'})).not.toBeTruthy();
});
});

0 comments on commit 6eab8cb

Please sign in to comment.