From c60e345cc12fc15921107b39a42c0a64c016948a Mon Sep 17 00:00:00 2001 From: Cheng Shi Date: Tue, 29 Oct 2024 15:27:06 -0400 Subject: [PATCH] fix: change the order of 'revoke' in e2e test --- .../account/ApiTokenInfoJSDataverseRepository.spec.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/e2e-integration/integration/account/ApiTokenInfoJSDataverseRepository.spec.ts b/tests/e2e-integration/integration/account/ApiTokenInfoJSDataverseRepository.spec.ts index 663fdb575..0683b3b70 100644 --- a/tests/e2e-integration/integration/account/ApiTokenInfoJSDataverseRepository.spec.ts +++ b/tests/e2e-integration/integration/account/ApiTokenInfoJSDataverseRepository.spec.ts @@ -11,6 +11,9 @@ const apiTokenInfoRepository = new ApiTokenInfoJSDataverseRepository() describe('API Token Info JSDataverse Repository', () => { before(() => TestsUtils.setup()) beforeEach(() => TestsUtils.login()) + it('revoke the API token', async () => { + await expect(apiTokenInfoRepository.deleteApiToken()).to.be.fulfilled + }) it('create or recreate the API token and return the new token info', async () => { const recreatedTokenInfo = await apiTokenInfoRepository.recreateApiToken() @@ -21,7 +24,7 @@ describe('API Token Info JSDataverse Repository', () => { expect(recreatedTokenInfo).to.have.property('expirationDate').that.is.a('string') }) - it('fetche the current API token', async () => { + it('fetch the current API token', async () => { const tokenInfo = await apiTokenInfoRepository.getCurrentApiToken() if (!tokenInfo) { throw new Error('API Token not found') @@ -29,8 +32,4 @@ describe('API Token Info JSDataverse Repository', () => { expect(tokenInfo).to.have.property('apiToken').that.is.a('string') expect(tokenInfo).to.have.property('expirationDate').that.is.a('string') }) - - it('revoke the API token', async () => { - await expect(apiTokenInfoRepository.deleteApiToken()).to.be.fulfilled - }) })