-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(babel-plugin-espower): update expectations since babel separates…
… syntax transformation
- Loading branch information
Showing
6 changed files
with
17 additions
and
40 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 |
---|---|---|
@@ -1,20 +1,7 @@ | ||
'use strict'; | ||
|
||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
|
||
assert((function () { | ||
function Me() { | ||
_classCallCheck(this, Me); | ||
assert(class Me { | ||
getClassName() { | ||
return foo + Me.name; | ||
} | ||
|
||
_createClass(Me, [{ | ||
key: 'getClassName', | ||
value: function getClassName() { | ||
return foo + Me.name; | ||
} | ||
}]); | ||
|
||
return Me; | ||
})()); | ||
}); |
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
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 |
---|---|---|
@@ -1,21 +1,19 @@ | ||
'use strict'; | ||
|
||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } } | ||
|
||
assert(assert._expr(assert._capt(hello.apply(undefined, _toConsumableArray(assert._capt(names, 'arguments/0/arguments/0/argument'))), 'arguments/0'), { | ||
assert(assert._expr(assert._capt(hello(...assert._capt(names, 'arguments/0/arguments/0/argument')), 'arguments/0'), { | ||
content: 'assert(hello(...names))', | ||
filepath: 'test/fixtures/SpreadElement/fixture.js', | ||
line: 3 | ||
})); | ||
|
||
assert(assert._expr(assert._capt(assert._capt([assert._capt(head, 'arguments/0/object/elements/0')].concat(_toConsumableArray(assert._capt(tail, 'arguments/0/object/elements/1/argument'))), 'arguments/0/object').length, 'arguments/0'), { | ||
content: 'assert([head,...tail].length)', | ||
assert(assert._expr(assert._capt(assert._capt([assert._capt(head, 'arguments/0/object/elements/0'), ...assert._capt(tail, 'arguments/0/object/elements/1/argument')], 'arguments/0/object').length, 'arguments/0'), { | ||
content: 'assert([head, ...tail].length)', | ||
filepath: 'test/fixtures/SpreadElement/fixture.js', | ||
line: 5 | ||
})); | ||
|
||
assert(assert._expr(assert._capt(f.apply(undefined, [assert._capt(head, 'arguments/0/arguments/0')].concat(_toConsumableArray(assert._capt(iter(), 'arguments/0/arguments/1/argument')), _toConsumableArray(assert._capt([assert._capt(foo, 'arguments/0/arguments/2/argument/elements/0'), assert._capt(bar, 'arguments/0/arguments/2/argument/elements/1')], 'arguments/0/arguments/2/argument')))), 'arguments/0'), { | ||
content: 'assert(f(head, ...iter(), ...[foo,bar]))', | ||
assert(assert._expr(assert._capt(f(assert._capt(head, 'arguments/0/arguments/0'), ...assert._capt(iter(), 'arguments/0/arguments/1/argument'), ...assert._capt([assert._capt(foo, 'arguments/0/arguments/2/argument/elements/0'), assert._capt(bar, 'arguments/0/arguments/2/argument/elements/1')], 'arguments/0/arguments/2/argument')), 'arguments/0'), { | ||
content: 'assert(f(head, ...iter(), ...[foo, bar]))', | ||
filepath: 'test/fixtures/SpreadElement/fixture.js', | ||
line: 7 | ||
})); |
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
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
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
"use strict"; | ||
|
||
var Person, assert; | ||
|
||
assert = require('power-assert'); | ||
|