npm run format:write

This commit is contained in:
2024-10-10 17:10:38 -05:00
parent e831c937c8
commit 304158a97e
3 changed files with 42 additions and 25 deletions
+23 -6
View File
@@ -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/ }
);