From 742adcbe6ee165952fcb3df3f342152b9aae14ea Mon Sep 17 00:00:00 2001 From: Stefan Eckert Date: Mon, 6 Apr 2020 17:31:23 +0200 Subject: [PATCH] fix(style): running test for style --- test/style.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/test/style.js b/test/style.js index 3e4d8cc5..44bb51dc 100644 --- a/test/style.js +++ b/test/style.js @@ -1,3 +1,4 @@ +import { assert } from 'chai'; import { style, templateStyle } from '../src/style'; import { victor } from '../src'; @@ -19,13 +20,22 @@ describe('style test.', () => { matrix.position = victor(-5, -6, -7); matrix.fov = 450; - matrix.position = victor(5, 6, 7); matrix.rotation = victor(45, 6, 7); - console.log('css vars', matrix.cssVars); + + const { cssVars } = matrix; + console.log('css vars', cssVars); console.log('for template', template); - // assert.equal(formatNumber(0.00000001), '0.00000001'); + assert.deepEqual(cssVars, { + '--position-x': -5, + '--position-y': -6, + '--position-z': -7, + '--fov': 450, + '--rotation-x': 45, + '--rotation-y': 6, + '--rotation-z': 7 + }); });