Files: eec7e99ad5ed7ffbc5e4ee856aaeaa8db5f1b6ea / 1_helloWorld.test.js
390 bytesRaw
1 | const test = require('tape') |
2 | |
3 | test('hello world', t => { |
4 | t.equal(2 + 2, 4, "basic addition works!") |
5 | t.end() |
6 | }) |
7 | |
8 | test('async hello world', t => { |
9 | t.plan(1) |
10 | setTimeout(() => { |
11 | t.equal(2 + 2, 4, "basic addition works!") |
12 | // Could put t.end here alternatively! |
13 | }) |
14 | }) |
15 | |
16 | test('throws hello world', t => { |
17 | t.plan(1) |
18 | t.throws(() => { |
19 | throw new Error("Hello world!") |
20 | }) |
21 | }) |
22 |
Built with git-ssb-web