From c8cde16424effcc334f3c64cc5be0c274d3cabff Mon Sep 17 00:00:00 2001 From: Moritz Schmidt Date: Thu, 29 Apr 2021 15:48:13 +0200 Subject: [PATCH] sometimes, unquoted shit must be interpreted as string --- src/class-parser.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/class-parser.spec.ts b/src/class-parser.spec.ts index 22573ad..a4e7b04 100644 --- a/src/class-parser.spec.ts +++ b/src/class-parser.spec.ts @@ -396,4 +396,11 @@ class testClass { }); }); }); + + describe("weird shit: ", () => { + it("unquoted array element as string: ", () => { + const testString = "y[] = {[};"; + expect(parse(testString)).toEqual({y: ["["]}); + }) + }) });