Created
April 28, 2018 12:56
-
-
Save lmiller1990/9432684bd15704d5e4aa5554b4b86aed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { | |
describe, | |
it, | |
expect, | |
matchers | |
} = require('./index') | |
let executes = 0 | |
const noop = () => { executes += 1 } | |
describe('describe', () => { | |
it('returns a function', () => { | |
const actual = describe('', noop) | |
expect(executes).toBe(1) | |
}) | |
}) | |
describe('expect', () => { | |
it('returns an object', () => { | |
const actual = expect(true) | |
expect(typeof actual).toBe('object') | |
expect(typeof actual.toBe).toBe('function') | |
}) | |
}) | |
describe('matchers', () => { | |
describe('toBe', () => { | |
it('works', () => { | |
const actual = matchers('1').toBe('1') | |
expect(actual).toBe(true) | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment