diff --git a/nx.json b/nx.json index 7a6031062cbe..0fbde20b91b3 100644 --- a/nx.json +++ b/nx.json @@ -8,7 +8,7 @@ "useLightClient": false, "namedInputs": { "sharedGlobals": [ - "{workspaceRoot}/project/testing/**/*.ts", + "{workspaceRoot}/projects/testing/**/*.ts", "{workspaceRoot}/nx.json", "{workspaceRoot}/package-lock.json", "{workspaceRoot}/tsconfig.*.json", diff --git a/projects/testing/setup-jest/index.ts b/projects/testing/setup-jest/index.ts index 081c0e3f5336..80ce215f9d38 100644 --- a/projects/testing/setup-jest/index.ts +++ b/projects/testing/setup-jest/index.ts @@ -142,7 +142,7 @@ class TransferMockEvent { global.DragEvent = TransferMockEvent as unknown as typeof DragEvent; global.ClipboardEvent = TransferMockEvent as unknown as typeof ClipboardEvent; -const originalDate = global.Date; +class OriginalDate extends Date {} class MockDate extends Date { constructor() { @@ -155,7 +155,7 @@ beforeAll(() => { }); afterAll(() => { - global.Date = originalDate; + global.Date = OriginalDate as unknown as DateConstructor; }); /**