UNPKG
assertvanish
Version:
latest (0.0.3-1)
0.0.3-1
0.0.2-2
0.0.2-1
0.0.1-3
0.0.1-2
0.0.1-1
assert that an object will vanish
github.com/thejh/node-assertvanish
thejh/node-assertvanish
assertvanish
/
test2.coffee
13 lines
(11 loc)
•
289 B
text/coffeescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
assertVanish
=
require
'./index'
bar
=
[]
createThing
=
(name,
data)
->
thing
=
{
name:
name
,
data:
data
,
first:
bar.length
>
0
}
# MEMORY LEAK!
bar.push
thing
test
=
->
myData
=
{
a:
4
,
b:
5
}
myThing
=
createThing
"foo"
,
myData
assertVanish
myData,
5000
setInterval
test,
10000