Fix issue where TypeScript errors in scripts/ folder weren't picked up

Summary: This diff fixes an issue where the `scripts` folder wasn't automatically type checked by TypeScript, and as a result `yarn flipper-server` was broken atm.

Reviewed By: nikoant

Differential Revision: D33348825

fbshipit-source-id: 059a834cacb881d45ae4b0933af3f1feabb90182
This commit is contained in:
Michel Weststrate
2021-12-29 06:48:10 -08:00
committed by Facebook GitHub Bot
parent 863727cbd8
commit dda68de445
7 changed files with 11 additions and 11 deletions

View File

@@ -14,7 +14,7 @@ import {cleanup} from '@testing-library/react';
import {resolve} from 'path';
import os from 'os';
(window as any).FlipperRenderHostInstance = createStubRenderHost();
(global as any).FlipperRenderHostInstance = createStubRenderHost();
import {TestUtils} from 'flipper-plugin';
import {
@@ -53,7 +53,7 @@ if (!test) {
beforeEach(() => {
// Fresh mock flipperServer for every test
(window as any).FlipperRenderHostInstance = createStubRenderHost();
(global as any).FlipperRenderHostInstance = createStubRenderHost();
});
afterEach(cleanup);
@@ -77,10 +77,10 @@ Object.defineProperty(global, 'performance', {
},
});
global.PerformanceObserver = PerformanceObserver;
(global as any).PerformanceObserver = PerformanceObserver;
// https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom
Object.defineProperty(window, 'matchMedia', {
Object.defineProperty(global, 'matchMedia', {
writable: true,
value: jest.fn().mockImplementation((query) => ({
matches: false,