Skip to content

Commit

Permalink
Chore: add class static blocks tests (refs eslint/eslint#15016)
Browse files Browse the repository at this point in the history
acorn has been upgraded in ee1d3ec, this commit
simiply added some tests. The tests were copied from test262, refs: tc39/test262@afe217b
  • Loading branch information
aladdin-add committed Sep 16, 2021
1 parent 593148d commit 7f1e182
Show file tree
Hide file tree
Showing 148 changed files with 12,117 additions and 11,966 deletions.
@@ -1,6 +1,6 @@
export default {
"index": 26,
"lineNumber": 3,
"index": 185,
"lineNumber": 4,
"column": 6,
"message": "Cannot use await in class static initialization block"
};
@@ -1,3 +1,4 @@
// refs: https://github.com/tc39/test262/commit/afe217b318df5f197e64b30a8b5a4b391c777359/test/language/expressions/arrow-function/static-init-await-binding.js
class C {
static {
(await => 0);
Expand Down
@@ -1,6 +1,6 @@
export default {
"index": 31,
"lineNumber": 3,
"index": 192,
"lineNumber": 4,
"column": 11,
"message": "Cannot use await in class static initialization block"
};
@@ -1,3 +1,4 @@
// refs: https://github.com/tc39/test262/commit/afe217b318df5f197e64b30a8b5a4b391c777359/test/language/expressions/arrow-function/static-init-await-reference.js
class C {
static {
((x = await) => 0);
Expand Down
@@ -1,6 +1,6 @@
export default {
"index": 32,
"lineNumber": 3,
"index": 182,
"lineNumber": 4,
"column": 12,
"message": "Cannot use await in class static initialization block"
};
@@ -1,3 +1,4 @@
// refs: https://github.com/tc39/test262/commit/afe217b318df5f197e64b30a8b5a4b391c777359/test/language/expressions/class/static-init-await-binding.js
class C {
static {
(class await {});
Expand Down
@@ -1,6 +1,6 @@
export default {
"index": 6,
"lineNumber": 3,
"index": 158,
"lineNumber": 4,
"column": 5,
"message": "Cannot use keyword 'await' outside an async function"
};

0 comments on commit 7f1e182

Please sign in to comment.