Skip to content

Commit

Permalink
1.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkeil committed Dec 15, 2021
1 parent ef1236e commit 753d74e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "convert-lambda-to-express",
"version": "1.1.6",
"version": "1.1.7",
"description": "Wrapper to run lambda on express. Works great for running lambdas as an express server during development but is production ready. Developed to work in conjunction with matthewkeil/full-stack-pattern cdk construct.",
"scripts": {
"node": "node",
Expand Down
10 changes: 5 additions & 5 deletions src/devServer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ describe('devServer', () => {

describe('loadEnvironment', () => {
beforeEach(() => {
overwrittenKeys.length = 0;
overwrittenKeys.clear();
});
afterEach(() => {
overwrittenKeys.length = 0;
overwrittenKeys.clear();
});
const environment1 = {
TEST_VAR: 'environment1-var1',
Expand All @@ -95,12 +95,12 @@ describe('devServer', () => {
delete process.env.TEST_VAR2;
delete process.env.TEST_VAR3;

expect(overwrittenKeys.length).toEqual(0);
expect(overwrittenKeys.size).toEqual(0);
loadEnvironment({ environment: environment1 });
loadEnvironment({ environment: environment2 });

expect(overwrittenKeys.length).toEqual(1);
expect(overwrittenKeys[0]).toEqual('TEST_VAR');
expect(overwrittenKeys.size).toEqual(1);
expect(overwrittenKeys.values().next().value).toEqual('TEST_VAR');

expect(process.env.TEST_VAR).toEqual(environment2.TEST_VAR);
expect(process.env.TEST_VAR2).toEqual(environment1.TEST_VAR2);
Expand Down

0 comments on commit 753d74e

Please sign in to comment.