Rename all proposal plugins to -proposal- from -transform- (#6570)
This commit is contained in:
29
packages/babel-plugin-proposal-function-bind/test/fixtures/function-bind/complex-call/exec.js
vendored
Normal file
29
packages/babel-plugin-proposal-function-bind/test/fixtures/function-bind/complex-call/exec.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
var operations = [];
|
||||
|
||||
var lib = {};
|
||||
|
||||
['f', 'g', 'h'].forEach(function (key) {
|
||||
var func = function () {
|
||||
return operations.push("lib." + key + "()");
|
||||
};
|
||||
Object.defineProperty(lib, key, {
|
||||
get: function () {
|
||||
operations.push("get lib." + key);
|
||||
return func;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
({prop:'value'})
|
||||
::lib.f()
|
||||
::lib.g()
|
||||
::lib.h();
|
||||
|
||||
assert.deepEqual(operations, [
|
||||
'get lib.f',
|
||||
'lib.f()',
|
||||
'get lib.g',
|
||||
'lib.g()',
|
||||
'get lib.h',
|
||||
'lib.h()'
|
||||
]);
|
||||
Reference in New Issue
Block a user