mirror of
https://github.com/onkelbeh/cheatsheets.git
synced 2026-08-15 05:30:16 +02:00
- Update some sheets which have very long sections - Remove `layout: 2017/sheet` (everything has the same layout now) - Remove outdated sheets
789 B
789 B
title, category
| title | category |
|---|---|
| Tape | JavaScript libraries |
Example
test('things', (t) => {
t.plan(1)
t.equal('actual', 'expected')
t.equal('actual', 'expected', 'should be equal') // messages are optional
t.end(err)
t.fail('msg')
t.pass('msg')
t.timeoutAfter(2000)
t.skip('msg')
t.ok(value, 'is truthy')
t.notOk(value, 'is falsy')
t.error(err, 'is falsy (print err.message)')
t.equal(actual, expected, 'is equal')
t.notEqual
t.deepEqual(actual, expected, 'is equal (use node's deepEqual)')
t.notDeepEqual
t.looseEqual(actual, expected, 'is equal (use node's deepEqual with ==)')
t.notLooseEqual
t.throws(fn, /FooError/)
t.throws(fn, FooError /* class */)
t.doesNotThrow
t.comment('message')
})
test.only((t) => { ... })