From 593643efdb07a05ae4190da3cd1aac99eab1325c Mon Sep 17 00:00:00 2001 From: freezy Date: Sun, 19 May 2019 00:17:26 +0200 Subject: [PATCH] fix: Playfield generation test. --- test/vpt/table.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/vpt/table.spec.ts b/test/vpt/table.spec.ts index eef4ce6d..39e68a9a 100644 --- a/test/vpt/table.spec.ts +++ b/test/vpt/table.spec.ts @@ -42,8 +42,8 @@ describe('The VPinball table generator', () => { it('should generate the correct playfield mesh', async () => { const playfieldMesh = three.first(gltf, 'playfield'); const playfieldVertices = three.vertices(playfieldMesh); - const expectedVertices = [ tableWidth, tableHeight, tableDepth, tableWidth, 0, tableDepth, tableWidth, tableHeight, 0, tableWidth, 0, tableDepth, tableWidth, 0, 0, tableWidth, tableHeight, 0, 0, tableHeight, 0, 0, 0, 0, 0, tableHeight, tableDepth, 0, 0, 0, 0, 0, tableDepth, 0, tableHeight, tableDepth, 0, tableHeight, 0, 0, tableHeight, tableDepth, tableWidth, tableHeight, 0, 0, tableHeight, tableDepth, tableWidth, tableHeight, tableDepth, tableWidth, tableHeight, 0, 0, 0, tableDepth, 0, 0, 0, tableWidth, 0, tableDepth, 0, 0, 0, tableWidth, 0, 0, tableWidth, 0, tableDepth, 0, tableHeight, tableDepth, 0, 0, tableDepth, tableWidth, tableHeight, tableDepth, 0, 0, tableDepth, tableWidth, 0, tableDepth, tableWidth, tableHeight, tableDepth, tableWidth, tableHeight, 0, tableWidth, 0, 0, 0, tableHeight, 0, tableWidth, 0, 0, 0, 0, 0, 0, tableHeight, 0 ]; - expect(compareArray(playfieldVertices, expectedVertices)).to.be.true; + const expectedVertices = [tableWidth, 0, 0, 0, 0, 0, 0, tableHeight, 0, 0, tableHeight, 0, tableWidth, tableHeight, 0, tableWidth, 0, 0, 0, tableHeight, tableDepth, 0, 0, tableDepth, tableWidth, 0, tableDepth, tableWidth, 0, tableDepth, tableWidth, tableHeight, tableDepth, 0, tableHeight, tableDepth, tableWidth, 0, 0, tableWidth, tableHeight, 0, tableWidth, 0, tableDepth, tableWidth, tableHeight, 0, tableWidth, tableHeight, tableDepth, tableWidth, 0, tableDepth, tableWidth, tableHeight, 0, 0, tableHeight, 0, tableWidth, tableHeight, tableDepth, 0, tableHeight, 0, 0, tableHeight, tableDepth, tableWidth, tableHeight, tableDepth, 0, tableHeight, 0, 0, 0, 0, 0, tableHeight, tableDepth, 0, 0, 0, 0, 0, tableDepth, 0, tableHeight, tableDepth, 0, 0, 0, tableWidth, 0, 0, 0, 0, tableDepth, tableWidth, 0, 0, tableWidth, 0, tableDepth, 0, 0, tableDepth]; + expect(compareArray(playfieldVertices, expectedVertices)).to.equal(true); }); it('should read the table script correctly', async () => {