2020-09-27 06:22:32 -04:00
|
|
|
import { assert, unitTest } from "./test_util.ts";
|
2019-02-18 18:43:02 -05:00
|
|
|
|
2020-03-04 11:31:14 -05:00
|
|
|
unitTest(function version(): void {
|
2019-09-15 18:36:27 -04:00
|
|
|
const pattern = /^\d+\.\d+\.\d+/;
|
2019-02-18 18:43:02 -05:00
|
|
|
assert(pattern.test(Deno.version.deno));
|
|
|
|
assert(pattern.test(Deno.version.v8));
|
2021-02-24 23:16:19 -05:00
|
|
|
// Unreleased version of TypeScript now set the version to 0-dev
|
|
|
|
assert(
|
|
|
|
pattern.test(Deno.version.typescript) ||
|
2021-05-27 19:33:11 -04:00
|
|
|
Deno.version.typescript === "0-dev" ||
|
|
|
|
Deno.version.typescript === "0-beta",
|
2021-02-24 23:16:19 -05:00
|
|
|
);
|
2019-02-18 18:43:02 -05:00
|
|
|
});
|