diff --git a/package.json b/package.json index a9093fec..b81a7102 100644 --- a/package.json +++ b/package.json @@ -19,11 +19,11 @@ "lint": "gulp lint", "build": "npm run compile && gulp build", "full-build": "npm run build && npm t", - "test": "node ./test/import-test.js && npm run test:build && mocha-headless-chrome -f ./test-build/unit-tests.html -a disable-web-security && npm run test:types", - "test:node": "env TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha -r ts-node/register test/unit/**/*.ts", + "test": "node ./test/import-test.js && npm run test:browser && npm run test:node", "test:build": "parcel build ./test/unit-tests.html --dist-dir test-build --target none --public-url ./ --no-source-maps", + "test:browser": "npm run test:build && mocha-headless-chrome -f ./test-build/unit-tests.html -a disable-web-security", + "test:node": "env TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha -r ts-node/register test/unit/**/*.ts", "test:watch": "rm -rf ./parcel-cache && parcel serve ./test/unit-tests.html ./test/manual-tests.html ./test/performance/bunnies.html", - "prettier": "prettier --write \"src/**/*.js\" \"test/**/*.js\" --single-quote", "tsc": "tsc --removeComments", "rollup": "rollup -c", "clean": "rm -rf ./lib && rm -rf ./types && rm -rf ./es", diff --git a/test/unit/AutoDraw-test.ts b/test/unit/AutoDraw-test.ts index ab193bb2..b2b92da1 100644 --- a/test/unit/AutoDraw-test.ts +++ b/test/unit/AutoDraw-test.ts @@ -105,7 +105,7 @@ describe('AutoDraw', function () { it('redraw for images', function (done) { // don't test on node, because of specific url access if (isNode) { - return; + return done(); } var stage = addStage(); var layer = new Konva.Layer(); diff --git a/test/unit/Node-test.ts b/test/unit/Node-test.ts index 3c1056a1..42b0cf40 100644 --- a/test/unit/Node-test.ts +++ b/test/unit/Node-test.ts @@ -3762,8 +3762,10 @@ describe('Node', function () { }); it('show warning when we are trying to use non-objects for component setters', function () { + if (!Konva.isUnminified) { + return; + } var stage = addStage(); - var callCount = 0; var oldWarn = Konva.Util.warn; Konva.Util.warn = function () {