From 26d6d437a92280ccb2d76e442115f04a66d2e64c Mon Sep 17 00:00:00 2001 From: Gabriel Grubba Date: Tue, 20 Dec 2022 11:02:48 -0300 Subject: [PATCH] tests: solved user() out of context --- packages/accounts-password/password_tests.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/accounts-password/password_tests.js b/packages/accounts-password/password_tests.js index 77c2f559bb..62f46ea871 100644 --- a/packages/accounts-password/password_tests.js +++ b/packages/accounts-password/password_tests.js @@ -1185,9 +1185,12 @@ if (Meteor.isServer) (() => { // This test properly belongs in accounts-base/accounts_tests.js, but // this is where the tests that actually log in are. - Tinytest.add('accounts - user() out of context', test => { + Tinytest.addAsync('accounts - user() out of context', async test => { // basic server context, no method. - test.throws(() => Meteor.user()); + await test.throwsAsync( + async () => + await Meteor.user() + ); }); // XXX would be nice to test