mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Add basic test of async functions and await expressions.
This commit is contained in:
@@ -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))
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user