First development of the deploy action (#6)
Some checks failed
Lint / pre-commit Linting (push) Has been cancelled
Some checks failed
Lint / pre-commit Linting (push) Has been cancelled
Deploy js code to an instance of screeps. Some debugging tools are implemented. Reviewed-on: #6 Co-authored-by: Philipp Horstenkamp <philipp@horstenkamp.de> Co-committed-by: Philipp Horstenkamp <philipp@horstenkamp.de>
This commit is contained in:
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()
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user