mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:10:42 +00:00
52012e321b
## Description: Npm script 'perf' errors on Windows: "Error [ERR_MODULE_NOT_FOUND]: Cannot find module '(XXX)\OpenFrontIO\tests\perf\*.ts'". It probably worked fine on Linux or Mac, that i don't know. Replaced it with a file that also runs all tests in the folder, which is then simply ran by the script. There are possibly better ways to address this but this just works. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: tryout33
10 lines
338 B
TypeScript
10 lines
338 B
TypeScript
import { execSync } from "child_process";
|
|
import { globSync } from "glob";
|
|
|
|
// "perf": "npx tsx tests/perf/*.ts" doesn't work on Windows
|
|
const files = globSync("tests/perf/*.ts").filter((f) => !f.includes("run-all"));
|
|
for (const file of files) {
|
|
console.log(`\nRunning ${file}...`);
|
|
execSync(`tsx "${file}"`, { stdio: "inherit" });
|
|
}
|