Skip to content

Commit 5a71996

Browse files
committed
test(build): loosen compiler patch version assertions
1 parent 9b50bd2 commit 5a71996

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

packages/build/src/extensions/internal/loadTypescript.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ describe("loadTypescript", () => {
5050
it("loads the consumer's TypeScript 5 compiler", () => {
5151
const compiler = loadTypescript(createProject({ typescript: "typescript5" }));
5252

53-
expect(compiler.version).toBe("5.9.3");
53+
expect(compiler.version).toMatch(/^5\./);
5454
expect(typeof compiler.transpileModule).toBe("function");
5555
});
5656

5757
it("loads the consumer's TypeScript 6 compiler", () => {
5858
const compiler = loadTypescript(createProject({ typescript: "typescript" }));
5959

60-
expect(compiler.version).toBe("6.0.3");
60+
expect(compiler.version).toMatch(/^6\./);
6161
expect(typeof compiler.transpileModule).toBe("function");
6262
});
6363

@@ -90,7 +90,7 @@ describe("loadTypescript", () => {
9090

9191
const compiler = loadTypescript(projectDir);
9292

93-
expect(compiler.version).toBe("6.0.3");
93+
expect(compiler.version).toMatch(/^6\./);
9494
expect(typeof compiler.transpileModule).toBe("function");
9595
});
9696

@@ -120,14 +120,14 @@ describe("loadTypescript", () => {
120120
}
121121
).outputText;
122122

123-
expect(compiler.version).toBe("6.0.3");
123+
expect(compiler.version).toMatch(/^6\./);
124124
expect(output).toContain('__metadata("design:paramtypes", [Dependency])');
125125
});
126126

127127
it("supports aliasing TypeScript to the compatibility package", () => {
128128
const compiler = loadTypescript(createProject({ typescript: "@typescript/typescript6" }));
129129

130-
expect(compiler.version).toBe("6.0.3");
130+
expect(compiler.version).toMatch(/^6\./);
131131
expect(typeof compiler.transpileModule).toBe("function");
132132
});
133133
});

0 commit comments

Comments
 (0)