You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/node_modules/ref/test/alloc.js

18 lines
393 B
JavaScript

var assert = require('assert')
var ref = require('../')
describe('alloc()', function () {
it('should return a new Buffer of "bool" size', function () {
var buf = ref.alloc(ref.types.bool)
assert.equal(ref.sizeof.bool, buf.length)
})
it('should coerce string type names', function () {
var buf = ref.alloc('bool')
assert.strictEqual(ref.types.bool, buf.type)
})
})