1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-09-20 14:01:55 +00:00
musix-oss/node_modules/ref/test/alloc.js
2020-03-03 22:30:50 +02:00

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)
})
})