Skip to content

Commit e2ea809

Browse files
committed
test(mocks): mock run for with betas, RCs and so on.
1 parent 0b32b31 commit e2ea809

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/utlis/mocks/compiler.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ function isRunRequest(url: URL | string) {
3030

3131
return (
3232
uri.host === API_HOST &&
33-
(uri.pathname.match(/^\/?\/api\/\d+\.\d+\.\d+\/compiler\/run$/) !== null ||
34-
uri.pathname.match(/^\/?\/api\/\d+\.\d+\.\d+\/compiler\/translate$/) !==
35-
null)
33+
(uri.pathname.match(
34+
/^\/?\/api\/\d+\.\d+\.\d+(-[a-z]+.\d+)?\/compiler\/run$/,
35+
) !== null ||
36+
uri.pathname.match(
37+
/^\/?\/api\/\d+\.\d+\.\d+(-[a-z]+.\d+)?\/compiler\/translate$/,
38+
) !== null)
3639
);
3740
}
3841

0 commit comments

Comments
 (0)