Skip to content

Commit

Permalink
Only run failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Dec 11, 2015
1 parent 7f79510 commit b6ce6ed
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modules/__tests__/toInclude-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*eslint-env mocha */
/*eslint-disable no-console */
import expect from '../index'
import isEqual from 'is-equal'

describe('toInclude', function () {
it('requires the actual value to be an array or string', function () {
Expand Down Expand Up @@ -27,8 +29,14 @@ describe('toInclude', function () {
}).toThrow(/to include/)
})

it('throws when an array does not contain an expected object', function () {
it.only('throws when an array does not contain an expected object', function () {
expect(function () {
console.log(isEqual({ a: 1 }, { a: 2 }))
console.log(isEqual({ c: 2 }, { a: 2 }))
console.log(
[ { a: 1 }, { c: 2 } ].some(o => isEqual(o, { a: 2 }))
)

expect([ { a: 1 }, { c: 2 } ]).toInclude({ a: 2 })
}).toThrow(/to include/)
})
Expand Down

0 comments on commit b6ce6ed

Please sign in to comment.