Add basic test of async functions and await expressions.

This commit is contained in:
Ben Newman
2016-01-25 14:21:05 -05:00
parent 6939940ca9
commit 2c1083feb3

View File

@@ -194,3 +194,12 @@ describe("Meteor packages", () => {
assert.strictEqual(mtp.where, Meteor.isServer ? "server" : "client");
});
});
describe("async functions", () => {
it("should work on the client and server", async () => {
assert.strictEqual(
await 2 + 2,
await new Promise(resolve => resolve(4))
);
});
});