From 2804d307aa4aeb7f05b0a33ee1aeac6e0de801b1 Mon Sep 17 00:00:00 2001 From: 9Morello Date: Sat, 2 Nov 2024 18:48:24 -0300 Subject: [PATCH] chore: fix warning about calling Meteor.user() instead of Meteor.userAsync() on the server, when running the accounts-password test suite --- packages/accounts-password/password_tests.js | 4 ++-- packages/accounts-password/password_tests_setup.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/accounts-password/password_tests.js b/packages/accounts-password/password_tests.js index 88461e7d91..a7b8b6eff4 100644 --- a/packages/accounts-password/password_tests.js +++ b/packages/accounts-password/password_tests.js @@ -1212,10 +1212,10 @@ 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.addAsync('accounts - user() out of context', async test => { + Tinytest.addAsync('accounts - userAsync() out of context', async test => { await test.throwsAsync( async () => - await Meteor.user() + await Meteor.userAsync() ); await Meteor.users.removeAsync({}); }); diff --git a/packages/accounts-password/password_tests_setup.js b/packages/accounts-password/password_tests_setup.js index 48a34c8766..50a1e95862 100644 --- a/packages/accounts-password/password_tests_setup.js +++ b/packages/accounts-password/password_tests_setup.js @@ -121,7 +121,7 @@ Accounts.config({ Meteor.methods( { testMeteorUser: - async () => await Meteor.user(), + async () => await Meteor.userAsync(), clearUsernameAndProfile: async function () {