Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add async arrow class property test with expression body
also move the async function tests under fixtures/class-properties
  • Loading branch information
calesce committed Sep 22, 2016
1 parent 2ee9e97 commit 1df6650
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 1 deletion.
@@ -1,6 +1,6 @@
{
"plugins": [
"syntax-class-properties",
"../../../../src/babel"
"../../../../../src/babel"
]
}
@@ -0,0 +1,3 @@
class Foo {
bar = async (a, b) => await b(a)
}
@@ -0,0 +1,21 @@
var _this = this;

class Foo {
bar = async (...params) => await _this.__bar__REACT_HOT_LOADER__(...params);

async __bar__REACT_HOT_LOADER__(a, b) {
return await b(a);
}

}
;

(function () {
if (typeof __REACT_HOT_LOADER__ === 'undefined') {
return;
}

__REACT_HOT_LOADER__.register(Foo, "Foo", __FILENAME__);
})();

;
6 changes: 6 additions & 0 deletions test/babel/fixtures/class-properties/async-functions/.babelrc
@@ -0,0 +1,6 @@
{
"plugins": [
"syntax-class-properties",
"../../../../../src/babel"
]
}

0 comments on commit 1df6650

Please sign in to comment.