Skip to content

Commit

Permalink
fix dotenv integration with jest (#111)
Browse files Browse the repository at this point in the history
Co-authored-by: danilo spinelli <danilo.spinelli@pagopa.itt>
  • Loading branch information
gunzip and danilo spinelli committed Oct 7, 2020
1 parent dc2145e commit fc47ef1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion StoreSpidLogs/__test__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ describe("StoreSpidLogs", () => {
}
};
const blobItem = await index(mockedContext as any, aSpidMsgItem);
console.log(blobItem);
const blob = blobItem as IOutputBinding;
const encryptedSpidBlobItem = blob.spidRequestResponse;
const decryptedRequestPayload = toPlainText(
Expand Down
2 changes: 0 additions & 2 deletions env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#This file is used for testing (jest),
#and must be renamed to .env (but not committed)
APPINSIGHTS_INSTRUMENTATIONKEY=foo
AZURE_NH_HUB_NAME=azhub
AZURE_NH_ENDPOINT=Endpoint=sb://host.docker.internal:30000;SharedAccessKeyName=DefaultFullSharedAccessSignature;SharedAccessKey=foobar
Expand Down
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require("dotenv").config({ path: "env.example" });

module.exports = {
preset: "ts-jest",
setupFiles: ["dotenv/config"],
testEnvironment: "node",
testPathIgnorePatterns: ["dist", "/node_modules"]
};

0 comments on commit fc47ef1

Please sign in to comment.