2021-11-23 11:45:18 -05:00
|
|
|
import { assert } from "./test_util.ts";
|
2019-02-18 18:43:02 -05:00
|
|
|
|
2021-11-23 11:45:18 -05:00
|
|
|
Deno.test(function version() {
|
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
|
|
|
});
|