Skip to content

Commit 1fda4f7

Browse files
committed
Tests for #567, #565
1 parent 031ad07 commit 1fda4f7

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎test/core/units/loader-parameters.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,11 @@ describe('loader parameters', function () {
5353
}, { json: true })
5454
assert.deepStrictEqual(result, expected)
5555
})
56+
57+
it('empty input', function () {
58+
// https://github.com/nodeca/js-yaml/issues/565#issuecomment-659696047
59+
// NOTE: in theory, can throw instead of undefined, for load().
60+
assert.strictEqual(yaml.load(''), undefined)
61+
assert.deepStrictEqual(yaml.loadAll(''), [])
62+
})
5663
})

0 commit comments

Comments
 (0)