diff options
author | 迷渡 <justjavac@gmail.com> | 2019-09-09 05:18:39 +0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-09-08 17:18:39 -0400 |
commit | f37df2d0d6d500f6321e23787ad0dfa267c72366 (patch) | |
tree | 14e6021ddf78ca341df188ca082c3498d023e28c /flags/parse_test.ts | |
parent | 25def60c213a2ebaa943779c18bcab1e8f30cd93 (diff) |
flags: Parse builtin properties (denoland/deno_std#579)
Original: https://github.com/denoland/deno_std/commit/03304cd2d3c1d1567f72f05708cf516795cc67af
Diffstat (limited to 'flags/parse_test.ts')
-rwxr-xr-x | flags/parse_test.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/flags/parse_test.ts b/flags/parse_test.ts index 2e154f78c..9918ce8bb 100755 --- a/flags/parse_test.ts +++ b/flags/parse_test.ts @@ -192,3 +192,10 @@ test(function nestedDottedObjects(): void { }); assertEquals(argv.beep, { boop: true }); }); + +test(function flagBuiltinProperty(): void { + const argv = parse(["--toString", "--valueOf", "foo"]); + assertEquals(argv, { toString: true, valueOf: "foo", _: [] }); + assertEquals(typeof argv.toString, "boolean"); + assertEquals(typeof argv.valueOf, "string"); +}); |