Skip to content

Commit 07b14bd

Browse files
authored
chore(build): refactor npm package scripts MONGOSH-534 (#661)
1 parent 59beaa8 commit 07b14bd

File tree

13 files changed

+421
-378
lines changed

13 files changed

+421
-378
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { expect } from 'chai';
2+
import { Config } from './config';
3+
import { redactConfig } from './redact-config';
4+
5+
describe('config redact-config', () => {
6+
const redactedKeys: Array<keyof Config> = [
7+
'evgAwsKey',
8+
'evgAwsSecret',
9+
'downloadCenterAwsKey',
10+
'downloadCenterAwsSecret',
11+
'githubToken'
12+
];
13+
14+
const config: Config = {} as Config;
15+
16+
beforeEach(() => {
17+
redactedKeys.forEach(k => {
18+
(config as any)[k] = 'asecret';
19+
});
20+
});
21+
22+
redactedKeys.forEach(k => {
23+
it(`removes ${k} from the config`, () => {
24+
const redacted = redactConfig(config);
25+
expect(redacted[k]).to.be.undefined;
26+
});
27+
});
28+
});

packages/build/src/npm-packages.spec.ts

Lines changed: 0 additions & 222 deletions
This file was deleted.

0 commit comments

Comments
 (0)