mirror of
https://github.com/goreleaser/goreleaser-action.git
synced 2026-05-20 09:21:53 +00:00
Initial commit
This commit is contained in:
commit
e28e23212c
778 changed files with 75786 additions and 0 deletions
26
node_modules/to-buffer/test.js
generated
vendored
Normal file
26
node_modules/to-buffer/test.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
var tape = require('tape')
|
||||
var toBuffer = require('./')
|
||||
|
||||
tape('buffer returns buffer', function (t) {
|
||||
t.same(toBuffer(Buffer('hi')), Buffer('hi'))
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('string returns buffer', function (t) {
|
||||
t.same(toBuffer('hi'), Buffer('hi'))
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('string + enc returns buffer', function (t) {
|
||||
t.same(toBuffer('6869', 'hex'), Buffer('hi'))
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('other input throws', function (t) {
|
||||
try {
|
||||
toBuffer(42)
|
||||
} catch (err) {
|
||||
t.same(err.message, 'Input should be a buffer or a string')
|
||||
t.end()
|
||||
}
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue