add playground pretzel maps
This commit is contained in:
7
test/fixtures/transformation/playground/pretzel-map/actual.js
vendored
Normal file
7
test/fixtures/transformation/playground/pretzel-map/actual.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
["foo", "bar"].map(:toUpperCase);
|
||||
[1.1234, 23.53245, 3].map(:toFixed(2));
|
||||
|
||||
var get = function () {
|
||||
return 2;
|
||||
};
|
||||
[1.1234, 23.53245, 3].map(:toFixed(get()));
|
||||
7
test/fixtures/transformation/playground/pretzel-map/exec.js
vendored
Normal file
7
test/fixtures/transformation/playground/pretzel-map/exec.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
assert.deepEqual(["foo", "bar"].map(:toUpperCase), ["FOO", "BAR"]);
|
||||
assert.deepEqual([1.1234, 23.53245, 3].map(:toFixed(2)), ["1.12", "23.53", "3.00"]);
|
||||
|
||||
var get = function () {
|
||||
return 2;
|
||||
}
|
||||
assert.deepEqual([1.1234, 23.53245, 3].map(:toFixed(get())), ["1.12", "23.53", "3.00"]);
|
||||
16
test/fixtures/transformation/playground/pretzel-map/expected.js
vendored
Normal file
16
test/fixtures/transformation/playground/pretzel-map/expected.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
var _args;
|
||||
["foo", "bar"].map(function (_val) {
|
||||
return _val.toUpperCase();
|
||||
});
|
||||
[1.1234, 23.53245, 3].map(function (_val2) {
|
||||
return _val2.toFixed(2);
|
||||
});
|
||||
|
||||
var get = function () {
|
||||
return 2;
|
||||
};
|
||||
[1.1234, 23.53245, 3].map((_args = [get()], function (_val3) {
|
||||
return _val3.toFixed(_args[0]);
|
||||
}));
|
||||
Reference in New Issue
Block a user