Skip to content

Commit

Permalink
test(NODE-5035): fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Feb 27, 2023
1 parent 32b0490 commit 6cfd1d5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/unit/cmap/auth/mongodb_oidc/token_entry_cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('TokenEntryCache', function () {
let entry;

before(function () {
cache.addEntry(tokenResult, serverResult, 'localhost', 'user');
cache.addEntry('localhost', 'user', tokenResult, serverResult);
entry = cache.getEntry('localhost', 'user');
});

Expand All @@ -42,7 +42,7 @@ describe('TokenEntryCache', function () {
const cache = new TokenEntryCache();

before(function () {
cache.addEntry(tokenResult, serverResult, 'localhost', 'user');
cache.addEntry('localhost', 'user', tokenResult, serverResult);
cache.clear();
});

Expand All @@ -60,8 +60,8 @@ describe('TokenEntryCache', function () {
};

before(function () {
cache.addEntry(tokenResult, serverResult, 'localhost', 'user');
cache.addEntry(nonExpiredResult, serverResult, 'localhost', 'user2');
cache.addEntry('localhost', 'user', tokenResult, serverResult);
cache.addEntry('localhost', 'user2', nonExpiredResult, serverResult);
cache.deleteExpiredEntries();
});

Expand All @@ -74,7 +74,7 @@ describe('TokenEntryCache', function () {
const cache = new TokenEntryCache();

before(function () {
cache.addEntry(tokenResult, serverResult, 'localhost', 'user');
cache.addEntry('localhost', 'user', tokenResult, serverResult);
cache.deleteEntry('localhost', 'user');
});

Expand All @@ -87,8 +87,8 @@ describe('TokenEntryCache', function () {
const cache = new TokenEntryCache();

before(function () {
cache.addEntry(tokenResult, serverResult, 'localhost', 'user');
cache.addEntry(tokenResult, serverResult, 'localhost');
cache.addEntry('localhost', 'user', tokenResult, serverResult);
cache.addEntry('localhost', 'user2', tokenResult, serverResult);
});

context('when there is a matching entry', function () {
Expand Down

0 comments on commit 6cfd1d5

Please sign in to comment.