fix: inline ENV variables when building excalidraw package (#4311)

This commit is contained in:
David Luzar 2021-11-24 16:25:19 +01:00 committed by GitHub
parent a132f154cb
commit 96b31ecbce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 51 additions and 1 deletions

View file

@ -1,6 +1,13 @@
import "@testing-library/jest-dom";
import "jest-canvas-mock";
import dotenv from "dotenv";
// jest doesn't know of .env.development so we need to init it ourselves
dotenv.config({
path: require("path").resolve(__dirname, "../.env.development"),
});
jest.mock("nanoid", () => {
return {
nanoid: jest.fn(() => "test-id"),