diff --git a/src/core/Dish.mjs b/src/core/Dish.mjs index 8137f97d..e5ba9aec 100755 --- a/src/core/Dish.mjs +++ b/src/core/Dish.mjs @@ -36,8 +36,8 @@ class Dish { * literal input */ constructor(dishOrInput=null, type = null) { - this.value = []; - this.type = Dish.BYTE_ARRAY; + this.value = new ArrayBuffer(0); + this.type = Dish.ARRAY_BUFFER; // Case: dishOrInput is dish object if (dishOrInput && diff --git a/tests/node/tests/nodeApi.mjs b/tests/node/tests/nodeApi.mjs index 0fef129b..1a21c39d 100644 --- a/tests/node/tests/nodeApi.mjs +++ b/tests/node/tests/nodeApi.mjs @@ -331,8 +331,8 @@ TestRegister.addApiTests([ it("Composable Dish: Should construct empty dish object", () => { const dish = new Dish(); - assert.deepEqual(dish.value, []); - assert.strictEqual(dish.type, 0); + assert.strictEqual(dish.value.byteLength, new ArrayBuffer(0).byteLength); + assert.strictEqual(dish.type, 4); }), it("Composable Dish: constructed dish should have apply prototype functions", () => {