From bbbb2f1f3286394003dd840dcbf6838e0b0ec7a2 Mon Sep 17 00:00:00 2001 From: numToStr Date: Thu, 25 Nov 2021 18:37:57 +0530 Subject: chore: add test for ecma private fields & methods --- tests/query/highlights/ecma/test.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/query/highlights/ecma/test.ts (limited to 'tests') diff --git a/tests/query/highlights/ecma/test.ts b/tests/query/highlights/ecma/test.ts new file mode 100644 index 000000000..e3c73d6ae --- /dev/null +++ b/tests/query/highlights/ecma/test.ts @@ -0,0 +1,25 @@ +class H { + pub_field = "Hello"; + // ^ property + + #priv_field = "World!"; + // ^ property + + #private_method() { + // ^ method + return `${this.pub_field} -- ${this.#priv_field}`; + // ^ property + // ^ property + } + + public_method() { + // ^ method + return this.#private_method(); + // ^ method + } + + ok() { + return this.public_method(); + // ^ method + } +} -- cgit v1.2.3-70-g09d2