Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
more passing tests for class properties transform
- Loading branch information
Showing
6 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["syntax-class-properties", "../../../../../src/babel"] | ||
} |
3 changes: 3 additions & 0 deletions
3
test/babel/fixtures/class-properties/not-a-function/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Foo { | ||
bar = 2; | ||
} |
14 changes: 14 additions & 0 deletions
14
test/babel/fixtures/class-properties/not-a-function/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class Foo { | ||
bar = 2; | ||
} | ||
; | ||
|
||
var _temp = function () { | ||
if (typeof __REACT_HOT_LOADER__ === 'undefined') { | ||
return; | ||
} | ||
|
||
__REACT_HOT_LOADER__.register(Foo, "Foo", __FILENAME__); | ||
}(); | ||
|
||
; |
3 changes: 3 additions & 0 deletions
3
test/babel/fixtures/class-properties/not-an-arrow-function/.babelrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["syntax-class-properties", "../../../../../src/babel"] | ||
} |
5 changes: 5 additions & 0 deletions
5
test/babel/fixtures/class-properties/not-an-arrow-function/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class Foo { | ||
bar = function (a, b) { | ||
return a(b); | ||
}; | ||
} |
16 changes: 16 additions & 0 deletions
16
test/babel/fixtures/class-properties/not-an-arrow-function/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class Foo { | ||
bar = function (a, b) { | ||
return a(b); | ||
}; | ||
} | ||
; | ||
|
||
var _temp = function () { | ||
if (typeof __REACT_HOT_LOADER__ === 'undefined') { | ||
return; | ||
} | ||
|
||
__REACT_HOT_LOADER__.register(Foo, "Foo", __FILENAME__); | ||
}(); | ||
|
||
; |