We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 979f07b commit e1fe1f6Copy full SHA for e1fe1f6
test/lib/telemetry.test.ts
@@ -67,11 +67,10 @@ describe("initSentry", () => {
67
expect(client?.getOptions().enabled).toBe(true);
68
});
69
70
- test("uses process.env.NODE_ENV for environment", () => {
+ test("derives environment from CLI_VERSION via getCliEnvironment()", () => {
71
const client = initSentry(true);
72
- expect(client?.getOptions().environment).toBe(
73
- process.env.NODE_ENV ?? "development"
74
- );
+ // In test/dev mode, CLI_VERSION is "0.0.0-dev" → "development"
+ expect(client?.getOptions().environment).toBe("development");
75
76
77
test("uses 0.0.0-dev version when SENTRY_CLI_VERSION is not defined", () => {
0 commit comments