We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eab8f23 commit 443835eCopy full SHA for 443835e
test/integration/auth/mongodb_aws.test.ts
@@ -88,15 +88,17 @@ describe('MONGODB-AWS', function () {
88
});
89
90
describe('with missing aws token', () => {
91
- let awsSessionToken;
+ let awsSessionToken: string | undefined;
92
93
- beforeEach(function () {
+ beforeEach(() => {
94
awsSessionToken = process.env.AWS_SESSION_TOKEN;
95
delete process.env.AWS_SESSION_TOKEN;
96
97
98
- afterEach(async () => {
99
- process.env.AWS_SESSION_TOKEN = awsSessionToken;
+ afterEach(() => {
+ if (awsSessionToken != null) {
100
+ process.env.AWS_SESSION_TOKEN = awsSessionToken;
101
+ }
102
103
104
it('should not throw an exception when aws token is missing', async function () {
0 commit comments