This commit is contained in:
Bret Comnes
2020-02-12 16:58:30 -07:00
parent 383cb4ca53
commit 80459935e1
98 changed files with 9972 additions and 1 deletions

38
node_modules/fast-fifo/test.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
const tape = require('tape')
const FIFO = require('./')
tape('basic', function (t) {
const q = new FIFO()
const values = [
1,
4,
4,
0,
null,
{},
Math.random(),
'',
'hello',
9,
1,
4,
5,
6,
7,
null,
null,
0,
0,
15,
52.2,
null
]
t.same(q.shift(), undefined)
t.ok(q.isEmpty())
for (const value of values) q.push(value)
while (!q.isEmpty()) t.same(q.shift(), values.shift())
t.same(q.shift(), undefined)
t.ok(q.isEmpty())
t.end()
})