Tests: TS: add back missing type checking

tsx does not run any type checking, hence a separate
tsc step is needed .

Also, fix resulting type issue caused by external lib types.
This commit is contained in:
larabr 2025-08-25 15:26:02 +02:00
parent 5027bcd0eb
commit c5f9ecf3e4
No known key found for this signature in database
GPG Key ID: 2A4BEC40729185DD
3 changed files with 11 additions and 4 deletions

6
package-lock.json generated
View File

@ -1944,9 +1944,9 @@
} }
}, },
"node_modules/@types/linkify-it": { "node_modules/@types/linkify-it": {
"version": "5.0.0", "version": "3.0.5",
"resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz",
"integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },

View File

@ -47,7 +47,7 @@
"build-test": "npm run build -- --config-build-only=test", "build-test": "npm run build -- --config-build-only=test",
"prepare": "npm run build", "prepare": "npm run build",
"test": "mocha --timeout 120000 test/unittests.js", "test": "mocha --timeout 120000 test/unittests.js",
"test-type-definitions": "tsx test/typescript/definitions.ts", "test-type-definitions": "tsc --project test/typescript/tsconfig.test.json && tsx test/typescript/definitions.ts",
"benchmark-time": "node test/benchmarks/time.js", "benchmark-time": "node test/benchmarks/time.js",
"benchmark-memory-usage": "node test/benchmarks/memory_usage.js", "benchmark-memory-usage": "node test/benchmarks/memory_usage.js",
"prebrowsertest": "npm run build-test", "prebrowsertest": "npm run build-test",

View File

@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"noEmit": true, // tested by tsx
},
"files": ["definitions.ts"]
}