From 5d7097489cbb5f8aa3d0b0ee65269ff169cc2df1 Mon Sep 17 00:00:00 2001 From: swiing Date: Sun, 22 Sep 2024 15:45:04 +0200 Subject: [PATCH] fix: test script for node v2x With node v2x, running tests results in error TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" See https://github.com/TypeStrong/ts-node/issues/2100 Solved as per https://github.com/TypeStrong/ts-node/issues/2100#issuecomment-2192292548 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 46ab22d..30c70b3 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "prepublishOnly": "npm run test", "style:fix": "prettier src/**/*.ts --write", "style:check": "prettier src/**/*.ts --check", - "test": "ts-node --esm --project ./tsconfig.esm.json ./test/index.ts", + "test": "node --test --loader ts-node/esm ./test/index.ts", "test:ci": "set TS_NODE_PROJECT=./tsconfig.esm.json && node --no-warnings=ExperimentalWarning --loader ts-node/esm ./test/index.ts" }, "repository": {