-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.test
67 lines (49 loc) · 1.27 KB
/
index.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
const
{ test } = require ('snuggsi')
void `YOU GOTSTA BE KIDDING ME`
test `Pending test`
test `I can't believe it's not butter on ${new Date} this is amazing!`
void (true) // this is a bug in tape
test `.test`
( 'test' in require ('.') )
test `.fetch`
void ( 'fetch' in require ('.') )
test `.read`
( 'read' in require ('.')
, 'some special message' )
test `.Server`
( 'Server' in require ('.') )
test `.Resource`
( 'Resource' in require ('.') )
test
('legacy test')
( true )
test `Predicate Return Assertions`
// BE SURE TO CHECK THIS TEST!
( () => 'this test evaluates returned predicate'
== 'this test evaluates returned predicate' )
test `Single Assertions`
( assert => assert ( 'foo' === 'foo' ) )
test `Currying Assertions`
( assert => assert
( 1 == '1' )
( 1 === 1 )
)
test `Multiple Assertions`
// https://en.wikipedia.org/wiki/Short-circuit_evaluation
( assert => // short circuits
assert ( true )
&& // message
assert ( true, 'with message' )
&& // currying
assert
( true )
( 'foo' )
( !!! false )
&& // loose predicate
assert ( '2' == 2 )
&& // strict predicate
assert ( 'baz' === 'baz' )
&& // compound predicate
assert ( 'true' && true && '1' && 1 )
) // Multiple Assertions