mirror of
https://github.com/bcomnes/deploy-to-neocities.git
synced 2026-01-21 00:46:29 +00:00
0.0.1
This commit is contained in:
38
node_modules/fast-fifo/test.js
generated
vendored
Normal file
38
node_modules/fast-fifo/test.js
generated
vendored
Normal 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()
|
||||
})
|
||||
Reference in New Issue
Block a user