insert-buckazoid
Version:
Roland MT-32 text display .syx generator.
13 lines • 827 B
JavaScript
var assert = require('assert');
var InsertBuckazoid = require('./../index.js');
describe("InsertBuckazoid()", function(){
it("should return a correct .syx file from text input", function(){
assert([0xF0, 0x41, 0x10, 0x16, 0x12, 0x20, 0x00, 0x00, 0x74, 0x65, 0x73, 0x74, 0x20, 0xF7], InsertBuckazoid("test"));
});
it("should chop down text if text is longer than 20 characters", function(){
assert([0xF0, 0x41, 0x10, 0x16, 0x12, 0x20, 0x00, 0x00, 0x74, 0x68, 0x69, 0x73, 0x69, 0x73, 0x61, 0x76, 0x65, 0x72, 0x79, 0x6C, 0x6F, 0x6E, 0x67, 0x74, 0x65, 0x78, 0x74, 0x77, 0x39, 0xF7], InsertBuckazoid("thisisaverylongtextwhichislongerthantwentycharactersforsure"));
});
it("should return -1 if non-text value is passed", function(){
assert(-1, InsertBuckazoid(13));
});
});