Skip to content

Commit

Permalink
test - add failing test for class with method named static
Browse files Browse the repository at this point in the history
  • Loading branch information
kumavis committed May 29, 2020
1 parent d61ed46 commit 65ed7e2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ test('supports class static properties', function (t) {
t.end()
})

test('supports class function named static', function (t) {
t.doesNotThrow(function () {
acorn.parse('class X { static () {} }', { sourceType: 'script' })
})
t.end()
})

test('supports private class static properties', function (t) {
t.doesNotThrow(function () {
acorn.parse('class X { static #x = y }', { sourceType: 'script' })
Expand Down

0 comments on commit 65ed7e2

Please sign in to comment.