From d982ea3dc8b3313fd0b2702c9f1d35584f73634b Mon Sep 17 00:00:00 2001 From: Marcos Defendi Date: Mon, 5 Feb 2024 17:40:34 -0300 Subject: [PATCH] test: make settings fully independent --- apps/meteor/tests/end-to-end/api/08-settings.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/meteor/tests/end-to-end/api/08-settings.js b/apps/meteor/tests/end-to-end/api/08-settings.js index d517b60eea9dc..4ea6a6ae778e1 100644 --- a/apps/meteor/tests/end-to-end/api/08-settings.js +++ b/apps/meteor/tests/end-to-end/api/08-settings.js @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { before, describe, it } from 'mocha'; +import { before, describe, it, after } from 'mocha'; import { getCredentials, api, request, credentials } from '../../data/api-data.js'; import { updateSetting } from '../../data/permissions.helper'; @@ -87,9 +87,9 @@ describe('[Settings]', function () { }); describe('With OAuth enabled', () => { - before((done) => { - updateSetting('Accounts_OAuth_Google', true).then(done); - }); + before(() => updateSetting('Accounts_OAuth_Google', true)); + + after(() => updateSetting('Accounts_OAuth_Google', false)); it('should include the OAuth service in the response', (done) => { // wait 3 seconds before getting the service list so the server has had time to update it @@ -111,9 +111,9 @@ describe('[Settings]', function () { }); describe('With OAuth disabled', () => { - before((done) => { - updateSetting('Accounts_OAuth_Google', false).then(done); - }); + before(() => updateSetting('Accounts_OAuth_Google', false)); + + after(() => updateSetting('Accounts_OAuth_Google', false)); it('should not include the OAuth service in the response', (done) => { // wait 3 seconds before getting the service list so the server has had time to update it