Skip to content

Commit

Permalink
Updated snapshot for new NodeJS version
Browse files Browse the repository at this point in the history
  • Loading branch information
swernerx committed Jun 4, 2019
1 parent f4e4dbd commit fa7fc6b
Showing 1 changed file with 10 additions and 73 deletions.
83 changes: 10 additions & 73 deletions __tests__/__snapshots__/target-node.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -99,24 +99,16 @@ new Set([1, 2, 3]);"
exports[`Target: NodeJS es2016: exponentiation 1`] = `
"\\"use strict\\";
var result = Math.pow(2, 3);"
var result = 2 ** 3;"
`;

exports[`Target: NodeJS esnext: async 1`] = `
"\\"use strict\\";
require(\\"core-js/modules/es.promise\\");
function wait() {
return new Promise(function ($return, $error) {
return Promise.resolve(loadData()).then(function () {
try {
return $return();
} catch ($boundEx) {
return $error($boundEx);
}
}, $error);
});
async function wait() {
await loadData();
}"
`;

Expand All @@ -127,69 +119,14 @@ require(\\"core-js/modules/es.array.iterator\\");
require(\\"core-js/modules/es.promise\\");
function executeTasks(tasks) {
return new Promise(function ($return, $error) {
var $Loop_3_trampoline, $Loop_3_local;
function $Loop_3_step() {
var [taskName, $iterator_taskName_2] = $Loop_3_local();
return $Loop_3.bind(this, taskName, $iterator_taskName_2);
}
function $Loop_3(taskName, $iterator_taskName_2) {
$Loop_3_local = function () {
return [taskName, $iterator_taskName_2];
};
if (!($iterator_taskName_2[1] = $iterator_taskName_2[0].next()).done && ((taskName = $iterator_taskName_2[1].value) || true)) {
var $Try_1_Post = function () {
try {
return $Loop_3_step;
} catch ($boundEx) {
return $error($boundEx);
}
},
$Try_1_Catch = function () {
try {
console.error(\\"Error\\");
return $Try_1_Post();
} catch ($boundEx) {
return $error($boundEx);
}
};
try {
return Promise.resolve(executeCommands()).then(function () {
try {
return $Try_1_Post();
} catch ($boundEx) {
return $Try_1_Catch($boundEx);
}
}, $Try_1_Catch);
} catch (error) {
$Try_1_Catch(error)
}
} else return [1];
}
return ($Loop_3_trampoline = function (q) {
while (q) {
if (q.then) return void q.then($Loop_3_trampoline, $error);
try {
if (q.pop) {
if (q.length) return q.pop() ? $Loop_3_exit.call(this) : q;else q = $Loop_3_step;
} else q = q.call(this);
} catch (_exception) {
return $error(_exception);
}
}
}.bind(this))($Loop_3.bind(this, void 0, [tasks[Symbol.iterator]()]));
function $Loop_3_exit() {
return $return();
async function executeTasks(tasks) {
for (const taskName of tasks) {
try {
await executeCommands();
} catch (error) {
console.error(\\"Error\\");
}
});
}
}"
`;

Expand Down

0 comments on commit fa7fc6b

Please sign in to comment.