mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
* first action! (#1)
This commit is contained in:
parent
8deacc95b1
commit
ace1e6a69a
3750 changed files with 1155519 additions and 0 deletions
28
node_modules/JSONStream/test/null.js
generated
vendored
Normal file
28
node_modules/JSONStream/test/null.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
var JSONStream = require('../')
|
||||
|
||||
var data = [
|
||||
{ID: 1, optional: null},
|
||||
{ID: 2, optional: null},
|
||||
{ID: 3, optional: 20},
|
||||
{ID: 4, optional: null},
|
||||
{ID: 5, optional: 'hello'},
|
||||
{ID: 6, optional: null}
|
||||
]
|
||||
|
||||
|
||||
var test = require('tape')
|
||||
|
||||
test ('null properties', function (t) {
|
||||
var actual = []
|
||||
var stream =
|
||||
|
||||
JSONStream.parse('*.optional')
|
||||
.on('data', function (v) { actual.push(v) })
|
||||
.on('end', function () {
|
||||
t.deepEqual(actual, [20, 'hello'])
|
||||
t.end()
|
||||
})
|
||||
|
||||
stream.write(JSON.stringify(data, null, 2))
|
||||
stream.end()
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue