Skip to content

Commit e1fe1f6

Browse files
committed
fix(test): update environment test to match getCliEnvironment() change
1 parent 979f07b commit e1fe1f6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/lib/telemetry.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,10 @@ describe("initSentry", () => {
6767
expect(client?.getOptions().enabled).toBe(true);
6868
});
6969

70-
test("uses process.env.NODE_ENV for environment", () => {
70+
test("derives environment from CLI_VERSION via getCliEnvironment()", () => {
7171
const client = initSentry(true);
72-
expect(client?.getOptions().environment).toBe(
73-
process.env.NODE_ENV ?? "development"
74-
);
72+
// In test/dev mode, CLI_VERSION is "0.0.0-dev" → "development"
73+
expect(client?.getOptions().environment).toBe("development");
7574
});
7675

7776
test("uses 0.0.0-dev version when SENTRY_CLI_VERSION is not defined", () => {

0 commit comments

Comments
 (0)