diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/unit/esnext_test.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/tests/unit/esnext_test.ts b/cli/tests/unit/esnext_test.ts new file mode 100644 index 000000000..558c678bc --- /dev/null +++ b/cli/tests/unit/esnext_test.ts @@ -0,0 +1,12 @@ +// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. +import { assertEquals, unitTest } from "./test_util.ts"; + +// TODO(@kitsonk) remove when we are no longer patching TypeScript to have +// these types available. + +unitTest(function typeCheckingEsNextArrayString() { + const a = "abcdef"; + assertEquals(a.at(-1), "f"); + const b = ["a", "b", "c", "d", "e", "f"]; + assertEquals(b.at(-1), "f"); +}); |