Reorganize tests and add tests

Add tests for static properties and private properties
This commit is contained in:
Peeyush Kushwaha 2017-06-18 02:00:13 +05:30
parent 4f8ac6bada
commit b60ac52ae6
11 changed files with 17 additions and 10 deletions

View File

@ -1,3 +0,0 @@
class Foo {
@foo[bar] a = 1;
}

View File

@ -1,4 +0,0 @@
{
"plugins": ["decoratorsStage2", "classProperties"],
"throws": "Unexpected token (2:12)"
}

View File

@ -0,0 +1,3 @@
class A {
@dec name = 0
}

View File

@ -1,3 +0,0 @@
class A {
@dec ['name'] = 0
}

View File

@ -0,0 +1,3 @@
class A {
@dec #name = 0
}

View File

@ -0,0 +1,4 @@
{
"plugins": ["classProperties", "classPrivateProperties", "decoratorsStage2"],
"throws": "Stage 2 decorators may only be used with a class or a class method (2:7)"
}

View File

@ -0,0 +1,3 @@
class A {
@dec static name = 0
}

View File

@ -0,0 +1,4 @@
{
"plugins": ["classProperties", "decoratorsStage2"],
"throws": "Stage 2 decorators may only be used with a class or a class method (2:7)"
}