Skip to content

Commit

Permalink
Revert "[test] Disable ESM for ts-node, because it either breaks with…
Browse files Browse the repository at this point in the history
… Node 20 or emits a warning per test."

Broke js tests

This reverts commit 1add7cf.
  • Loading branch information
pfusik committed Nov 5, 2023
1 parent 1add7cf commit 4b3ed2c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ test/bin/%/js.txt: test/bin/%/Test.js
$(DO)node $< >$@ || grep '//FAIL:.*\<js\>' test/$*.fu

test/bin/%/ts.txt: test/bin/%/Test.ts test/node_modules test/tsconfig.json
$(DO)test/node_modules/.bin/ts-node $< >$@ || grep '//FAIL:.*\<ts\>' test/$*.fu
$(DO)(cd test && node --loader ts-node/esm ../$< >../$@) || grep '//FAIL:.*\<ts\>' test/$*.fu

test/bin/%/py.txt: test/bin/%/Test.py
$(DO)$(PYTHON) $< >$@ || grep '//FAIL:.*\<py\>' test/$*.fu
Expand Down
1 change: 1 addition & 0 deletions test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "3.0.2-development",
"repository": "https://github.com/fusionlanguage/fut.git",
"author": "Piotr Fusik",
"type": "module",
"dependencies": {
"ts-node": "^10.9.1"
}
Expand Down
4 changes: 4 additions & 0 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"compilerOptions": {
"target": "es2021",
"module": "ESNext",
"noEmit": true,
"strictNullChecks": false,
"forceConsistentCasingInFileNames": true
},
"ts-node": {
"esm": true
}
}

0 comments on commit 4b3ed2c

Please sign in to comment.