Skip to content

Commit f59ee72

Browse files
fix: configure jasmine to use require() for loading spec files
Jasmine 5 defaults to import() which goes through Node's ESM loader. Node 22's ESM loader cannot handle .ts files natively since ts-node only registers a CJS require hook. Setting jsLoader to "require" makes jasmine use require() instead, which ts-node intercepts correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent da1ec25 commit f59ee72

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

jasmine.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"spec_dir": "test",
3-
"spec_files": ["**/*[sS]pec.ts"]
3+
"spec_files": ["**/*[sS]pec.ts"],
4+
"jsLoader": "require"
45
}

0 commit comments

Comments
 (0)