Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(profiling-node): Ensure E2E tests run for profiling-node #15248

Merged
merged 6 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "node-profiling-cjs",
"version": "1.0.0",
"private": true,
"scripts": {
"typecheck": "tsc --noEmit",
"test": "node dist/cjs/index.js",
"clean": "npx rimraf node_modules dist",
"test:build": "pnpm install && node build-cjs.mjs",
"test:assert": "pnpm run typecheck && pnpm run test"
},
"dependencies": {
"@playwright/test": "~1.50.0",
"@sentry/node": "latest || *",
"@sentry/profiling-node": "latest || *",
"esbuild": "0.20.0",
"typescript": "^5.7.3"
},
"volta": {
"extends": "../../package.json"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# @sentry:registry=http://127.0.0.1:4873
# @sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ test('an h1 contains hello world"', async () => {
process: {
env: {
...process.env,
NODE_ENV: 'development',
},
},
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "node-profiling-electron",
"version": "1.0.0",
"private": true,
"scripts": {
"clean": "npx rimraf node_modules dist",
"test:build": "pnpm install",
"test:assert": "$(pnpm bin)/electron-rebuild && pnpm playwright test"
},
"dependencies": {
"@electron/rebuild": "^3.7.0",
"@playwright/test": "~1.50.0",
"@sentry/electron": "latest || *",
"@sentry/node": "latest || *",
"@sentry/profiling-node": "latest || *",
"electron": "^33.2.0"
},
"volta": {
"extends": "../../package.json"
},
"sentryTest": {
"skip": true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# @sentry:registry=http://127.0.0.1:4873
# @sentry-internal:registry=http://127.0.0.1:4873
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import * as Sentry from '@sentry/node';
import { nodeProfilingIntegration } from '@sentry/profiling-node';

const wait = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));

Sentry.init({
dsn: 'https://[email protected]/6625302',
integrations: [nodeProfilingIntegration()],
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
});

Sentry.startSpan({ name: 'Precompile test' }, async () => {
await wait(500);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "node-profiling-esm",
"version": "1.0.0",
"private": true,
"scripts": {
"typecheck": "tsc --noEmit",
"test": "node dist/esm/index.mjs",
"clean": "npx rimraf node_modules dist",
"test:build": "pnpm install && node build-esm.mjs",
"test:assert": "pnpm run typecheck && pnpm run test"
},
"dependencies": {
"@playwright/test": "~1.50.0",
"@sentry/node": "latest || *",
"@sentry/profiling-node": "latest || *",
"esbuild": "0.20.0",
"typescript": "^5.7.3"
},
"volta": {
"extends": "../../package.json"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"types": ["node"],
"esModuleInterop": true,
"lib": ["es2018"],
"strict": true,
"outDir": "dist",
"target": "ESNext",
"moduleResolution": "node",
"skipLibCheck": true
},
"include": ["index.ts"]
}

This file was deleted.

Loading