2021-11-23 17:45:18 +01:00
|
|
|
import { assert } from "./test_util.ts";
|
2019-02-19 08:43:02 +09:00
|
|
|
|
2021-11-23 17:45:18 +01:00
|
|
|
Deno.test(function version() {
|
2019-09-15 18:36:27 -04:00
|
|
|
const pattern = /^\d+\.\d+\.\d+/;
|
2019-02-19 08:43:02 +09:00
|
|
|
assert(pattern.test(Deno.version.deno));
|
|
|
|
assert(pattern.test(Deno.version.v8));
|
2021-02-25 15:16:19 +11:00
|
|
|
// Unreleased version of TypeScript now set the version to 0-dev
|
|
|
|
assert(
|
|
|
|
pattern.test(Deno.version.typescript) ||
|
2021-05-28 09:33:11 +10:00
|
|
|
Deno.version.typescript === "0-dev" ||
|
2021-12-10 09:12:21 +11:00
|
|
|
Deno.version.typescript === "0-beta" ||
|
|
|
|
Deno.version.typescript === "1-rc",
|
2021-02-25 15:16:19 +11:00
|
|
|
);
|
2019-02-19 08:43:02 +09:00
|
|
|
});
|