Skip to content

Commit e177024

Browse files
committed
fix(tests): await for auth.authenticate in header test
1 parent ac8e6d6 commit e177024

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/unit/cloudantBaseService.test.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ describe('Test CloudantBaseService', () => {
131131
notDeepStrictEqual(auth.tokenManager, tokenManager);
132132
});
133133

134-
it('Apply SDK UA header', () => {
134+
it('Apply SDK UA header', async () => {
135135
const auth = new CouchdbSessionAuthenticator({
136136
username: 'test',
137137
password: 'user', // pragma: allowlist secret
@@ -147,7 +147,7 @@ describe('Test CloudantBaseService', () => {
147147
auth.tokenManager.requestWrapperInstance.sendRequest = spy();
148148

149149
try {
150-
auth.authenticate();
150+
await auth.authenticate();
151151
// eslint-disable-next-line no-empty
152152
} catch (e) {}
153153
ok(auth.tokenManager.requestWrapperInstance.sendRequest.calledOnce);

0 commit comments

Comments
 (0)