Merge pull request #13443 from 9Morello/chore/fix-warnings-on-accounts-password-tests

chore: fix warnings about calling Meteor.user() instead of Meteor.userAsync on the server when running accounts-password's test suite
This commit is contained in:
Leonardo Venturini
2024-11-11 10:34:28 -04:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -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({});
});

View File

@@ -121,7 +121,7 @@ Accounts.config({
Meteor.methods(
{
testMeteorUser:
async () => await Meteor.user(),
async () => await Meteor.userAsync(),
clearUsernameAndProfile:
async function () {