diff --git a/lib/msal-react/package.json b/lib/msal-react/package.json index 2e8bc9ea49..1f77de7b9c 100644 --- a/lib/msal-react/package.json +++ b/lib/msal-react/package.json @@ -22,7 +22,7 @@ }, "scripts": { "start": "tsdx watch", - "build": "tsdx build", + "build": "tsdx build --tsconfig ./tsconfig.build.json", "build:modules:watch": "tsdx watch --verbose", "test": "tsdx test .*.spec.*", "lint": "cd ../../ && npm run lint:react", @@ -53,7 +53,6 @@ "@types/jest": "^26.0.15", "@types/react": "^16.9.43", "@types/react-dom": "^16.9.8", - "@types/testing-library__jest-dom": "^5.9.5", "babel-loader": "^8.1.0", "husky": "^4.2.5", "jest": "^26.6.1", diff --git a/lib/msal-react/test/components/AuthenticatedComponent.spec.tsx b/lib/msal-react/test/components/AuthenticatedComponent.spec.tsx index 585e88d522..247e5b8b26 100644 --- a/lib/msal-react/test/components/AuthenticatedComponent.spec.tsx +++ b/lib/msal-react/test/components/AuthenticatedComponent.spec.tsx @@ -5,7 +5,7 @@ import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; -import "@testing-library/jest-dom/extend-expect"; +import "@testing-library/jest-dom"; import { testAccount, TEST_CONFIG } from "../TestConstants"; import { MsalProvider } from "../../src/MsalProvider"; import { AuthenticatedTemplate } from "../../src/components/AuthenticatedTemplate"; diff --git a/lib/msal-react/test/components/UnauthenticatedComponent.spec.tsx b/lib/msal-react/test/components/UnauthenticatedComponent.spec.tsx index 0d273a0521..a8193fa7fc 100644 --- a/lib/msal-react/test/components/UnauthenticatedComponent.spec.tsx +++ b/lib/msal-react/test/components/UnauthenticatedComponent.spec.tsx @@ -5,7 +5,7 @@ import React from "react"; import { render, screen, waitFor } from "@testing-library/react"; -import "@testing-library/jest-dom/extend-expect"; +import "@testing-library/jest-dom"; import { testAccount, TEST_CONFIG } from "../TestConstants"; import { MsalProvider } from "../../src/MsalProvider"; import { UnauthenticatedTemplate } from "../../src/components/UnauthenticatedTemplate"; diff --git a/lib/msal-react/tsconfig.build.json b/lib/msal-react/tsconfig.build.json new file mode 100644 index 0000000000..0f946f3dc8 --- /dev/null +++ b/lib/msal-react/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src" + }, + "include": ["src"] +} \ No newline at end of file diff --git a/lib/msal-react/tsconfig.json b/lib/msal-react/tsconfig.json index 71606db2f6..a4397dc5c6 100644 --- a/lib/msal-react/tsconfig.json +++ b/lib/msal-react/tsconfig.json @@ -1,12 +1,12 @@ { - "include": ["src", "types"], + "include": ["src", "types", "test"], "compilerOptions": { "module": "esnext", "lib": ["dom", "esnext"], "importHelpers": true, "declaration": true, "sourceMap": true, - "rootDir": "./src", + "rootDir": "./", "strict": true, "noUnusedLocals": true, "noUnusedParameters": true,