Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
test: add ts-node-esm test
Browse files Browse the repository at this point in the history
NB: `ts-node` fails -- cf: #200
lachrist committed Mar 3, 2023
1 parent c2c2acd commit 72add38
Showing 5 changed files with 304 additions and 2 deletions.
274 changes: 273 additions & 1 deletion package-lock.json
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -81,7 +81,8 @@
"semantic-release": "^19.0.5",
"sinon": "^14.0.0",
"source-map": "^0.7.4",
"sqlite3": "^5.0.2"
"sqlite3": "^5.0.2",
"ts-node": "^10.9.1"
},
"publishConfig": {
"cache": "~/.npm",
23 changes: 23 additions & 0 deletions test/cases/ts-node-esm/appmap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
recorder: process
processes:
- regexp: /child-entrypoint\.js$
enabled: true
default-process:
enabled: false
packages:
glob: "*"
enabled: true
default-package:
enabled: false
command: npx ts-node-esm square.test.ts
appmap_dir: .
appmap_file: square
hooks:
cjs: true
esm: true
apply: true
eval: false
http: false
mysql: false
pg: false
sqlite3: false
5 changes: 5 additions & 0 deletions test/cases/ts-node-esm/square.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { square } from "./square";

if (square(3) !== 9) {
throw new Error("expected 3 * 3 to be 9");
}
1 change: 1 addition & 0 deletions test/cases/ts-node-esm/square.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const square = (x: number): number => x * x;

0 comments on commit 72add38

Please sign in to comment.