Skip to content

Commit 780af90

Browse files
committed
test: Update profiling e2e test to use typescript
1 parent 343d9c9 commit 780af90

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

dev-packages/e2e-tests/test-applications/node-profiling/build.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ console.log('Running build using esbuild version', esbuild.version);
1010

1111
esbuild.buildSync({
1212
platform: 'node',
13-
entryPoints: ['./index.js'],
13+
entryPoints: ['./index.ts'],
1414
outdir: './dist',
1515
target: 'esnext',
1616
format: 'cjs',

dev-packages/e2e-tests/test-applications/node-profiling/index.js renamed to dev-packages/e2e-tests/test-applications/node-profiling/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const Sentry = require('@sentry/node');
2-
const { nodeProfilingIntegration } = require('@sentry/profiling-node');
1+
import * as Sentry from '@sentry/node';
2+
import { nodeProfilingIntegration } from '@sentry/profiling-node';
33

4-
const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
4+
const wait = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
55

66
Sentry.init({
77
dsn: 'https://[email protected]/6625302',

dev-packages/e2e-tests/test-applications/node-profiling/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
"version": "1.0.0",
44
"private": true,
55
"scripts": {
6+
"typecheck": "tsc --noEmit",
67
"build": "node build.mjs",
78
"start": "node index.js",
89
"test": "node index.js && node build.mjs",
910
"clean": "npx rimraf node_modules",
10-
"test:build": "npm run build",
11+
"test:build": "npm run typecheck && npm run build",
1112
"test:assert": "npm run test"
1213
},
1314
"dependencies": {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"types": ["node"],
4+
"esModuleInterop": true,
5+
"lib": ["es2018"],
6+
"strict": true,
7+
"outDir": "dist",
8+
"target": "ESNext",
9+
"moduleResolution": "node",
10+
"skipLibCheck": true
11+
},
12+
"include": ["index.ts"]
13+
}

0 commit comments

Comments
 (0)