From 500eaa456980d159778becb81d4199566e92e704 Mon Sep 17 00:00:00 2001 From: antelle Date: Sat, 29 May 2021 22:12:28 +0200 Subject: [PATCH] tests tsconfig --- package.json | 2 +- tsconfig.tests.json | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tsconfig.tests.json diff --git a/package.json b/package.json index 6c762c29..59b16bf7 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ }, "scripts": { "start": "grunt", - "test": "mocha --require ts-node/register,tsconfig-paths/register,test/init.ts --recursive --reporter spec 'test/**/*.spec.ts'", + "test": "cross-env TS_NODE_PROJECT=tsconfig.tests.json mocha --require ts-node/register,tsconfig-paths/register,test/init.ts --recursive --reporter spec 'test/**/*.spec.ts'", "eslint": "grunt eslint", "build-beta": "grunt --beta && cp dist/index.html ../keeweb-beta/index.html && cd ../keeweb-beta && git add index.html && git commit -a -m 'beta' && git push origin master", "electron": "cross-env KEEWEB_IS_PORTABLE=0 ELECTRON_DISABLE_SECURITY_WARNINGS=1 KEEWEB_EMULATE_HARDWARE_ENCRYPTION=persistent KEEWEB_HTML_PATH=http://localhost:8085 electron desktop --no-sandbox", diff --git a/tsconfig.tests.json b/tsconfig.tests.json new file mode 100644 index 00000000..32615af1 --- /dev/null +++ b/tsconfig.tests.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "preserveConstEnums": true, + "sourceMap": true, + "strict": true, + "jsx": "react-jsx", + "jsxImportSource": "preact", + "baseUrl": "app/scripts", + "noEmitOnError": true, + "esModuleInterop": true + }, + "include": ["app/scripts/**/*", "test/**/*.ts"] +}