From 8735b784ba7838c1002b521a7f9f23bb27263d03 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Thu, 19 May 2022 11:15:21 +0200 Subject: [PATCH] fix: recompile before funit and unit commands (#8363) Running only tsc-cjs does not seem sufficient for rebuilding the project after the compat layer for ESM was introduced. Let's run `tsc` instead although it's somewhat slower. Issues: #8362 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0783fce1..b7fc56d9 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "scripts": { "test-browser": "wtr", "test-browser-watch": "wtr --watch", - "unit": "npm run tsc-cjs && mocha --config mocha-config/puppeteer-unit-tests.js", + "unit": "npm run tsc-cjs && npm run tsc-compat-cjs && mocha --config mocha-config/puppeteer-unit-tests.js", "chrome-headless-unit": "cross-env HEADLESS=chrome npm run unit", - "unit-debug": "npm run tsc-cjs && mocha --inspect-brk --config mocha-config/puppeteer-unit-tests.js", + "unit-debug": "npm run tsc-cjs && npm run tsc-compat-cjs && mocha --inspect-brk --config mocha-config/puppeteer-unit-tests.js", "unit-with-coverage": "cross-env COVERAGE=1 npm run unit", "assert-unit-coverage": "cross-env COVERAGE=1 mocha --config mocha-config/coverage-tests.js", "funit": "cross-env PUPPETEER_PRODUCT=firefox npm run unit",