mirror of
https://github.com/jwetzell/osc-js.git
synced 2026-08-21 06:49:02 +00:00
npm run format:write
This commit is contained in:
@@ -77,7 +77,9 @@ describe('OSC Message Decoding', () => {
|
||||
it('bad address', () => {
|
||||
throws(
|
||||
() => {
|
||||
osc.messageFromBuffer(new Uint8Array([0x68,0x65,0x6c,0x6c,0x6f,0x00,0x00,0x2c,0x66,0x00,0x00,0x42,0x0a,0x00,0x00]));
|
||||
osc.messageFromBuffer(
|
||||
new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x2c, 0x66, 0x00, 0x00, 0x42, 0x0a, 0x00, 0x00])
|
||||
);
|
||||
},
|
||||
{ name: /^Error$/, message: /must start with/ }
|
||||
);
|
||||
@@ -86,7 +88,9 @@ describe('OSC Message Decoding', () => {
|
||||
it('bad type string', () => {
|
||||
throws(
|
||||
() => {
|
||||
osc.messageFromBuffer(new Uint8Array([0x2f,0x68,0x65,0x6c,0x6c,0x6f,0x00,0x00,0x66,0x00,0x00,0x00,0x42,0x0a,0x00]));
|
||||
osc.messageFromBuffer(
|
||||
new Uint8Array([0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x42, 0x0a, 0x00])
|
||||
);
|
||||
},
|
||||
{ name: /^Error$/, message: /type string must start with/ }
|
||||
);
|
||||
@@ -95,7 +99,11 @@ describe('OSC Message Decoding', () => {
|
||||
it('unknown type', () => {
|
||||
throws(
|
||||
() => {
|
||||
osc.messageFromBuffer(new Uint8Array([0x2f,0x68,0x65,0x6c,0x6c,0x6f,0x00,0x00,0x2c,0x7a,0x00,0x00,0x42,0x0a,0x00,0x00]));
|
||||
osc.messageFromBuffer(
|
||||
new Uint8Array([
|
||||
0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x2c, 0x7a, 0x00, 0x00, 0x42, 0x0a, 0x00, 0x00,
|
||||
])
|
||||
);
|
||||
},
|
||||
{ name: /^Error$/, message: /unknown/ }
|
||||
);
|
||||
@@ -104,7 +112,9 @@ describe('OSC Message Decoding', () => {
|
||||
it('float arg missing bytes', () => {
|
||||
throws(
|
||||
() => {
|
||||
osc.messageFromBuffer(new Uint8Array([0x2f,0x68,0x65,0x6c,0x6c,0x6f,0x00,0x00,0x2c,0x66,0x00,0x00,0x42,0x0a,0x00]));
|
||||
osc.messageFromBuffer(
|
||||
new Uint8Array([0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x2c, 0x66, 0x00, 0x00, 0x42, 0x0a, 0x00])
|
||||
);
|
||||
},
|
||||
{ name: /^Error$/, message: /not enough bytes/ }
|
||||
);
|
||||
@@ -113,7 +123,9 @@ describe('OSC Message Decoding', () => {
|
||||
it('int arg missing bytes', () => {
|
||||
throws(
|
||||
() => {
|
||||
osc.messageFromBuffer(new Uint8Array([0x2f,0x68,0x65,0x6c,0x6c,0x6f,0x00,0x00,0x2c,0x69,0x00,0x00,0x00,0x00,0x00]));
|
||||
osc.messageFromBuffer(
|
||||
new Uint8Array([0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x2c, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00])
|
||||
);
|
||||
},
|
||||
{ name: /^Error$/, message: /not enough bytes/ }
|
||||
);
|
||||
@@ -122,7 +134,12 @@ describe('OSC Message Decoding', () => {
|
||||
it('blob bytes too small', () => {
|
||||
throws(
|
||||
() => {
|
||||
osc.messageFromBuffer(new Uint8Array([0x2f,0x68,0x65,0x6c,0x6c,0x6f,0x00,0x00,0x2c,0x62,0x00,0x00,0x00,0x00,0x00,0x04,0x62,0x6c,0x6f]));
|
||||
osc.messageFromBuffer(
|
||||
new Uint8Array([
|
||||
0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x00, 0x00, 0x2c, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x62, 0x6c,
|
||||
0x6f,
|
||||
])
|
||||
);
|
||||
},
|
||||
{ name: /^Error$/, message: /not enough bytes/ }
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user