diff --git a/src/about/AboutDialog.test.tsx b/src/about/AboutDialog.test.tsx index 9f47e7a3..34b2e504 100644 --- a/src/about/AboutDialog.test.tsx +++ b/src/about/AboutDialog.test.tsx @@ -15,11 +15,11 @@ import { Store } from 'redux'; import AboutDialog from './AboutDialog'; it('should close when the button is clicked', () => { - const store = ({ + const store = { getState: jest.fn(() => ({ licenses: { list: null } })), dispatch: jest.fn(), subscribe: jest.fn(), - } as unknown) as Store; + } as unknown as Store; const i18n = new I18nManager({ locale: 'en' }); const close = jest.fn(); render( @@ -36,11 +36,11 @@ it('should close when the button is clicked', () => { }); it('should manage license dialog open/close', async () => { - const store = ({ + const store = { getState: jest.fn(() => ({ licenses: { list: null } })), dispatch: jest.fn(), subscribe: jest.fn(), - } as unknown) as Store; + } as unknown as Store; const i18n = new I18nManager({ locale: 'en' }); render( diff --git a/src/app/actions.ts b/src/app/actions.ts index f9b2d10b..1b80ad0e 100644 --- a/src/app/actions.ts +++ b/src/app/actions.ts @@ -59,9 +59,10 @@ export function didCheckForUpdate(updateFound: boolean): AppDidCheckForUpdateAct } /* Action that indicates the browser wants to prompt the use to install the app. */ -export type AppDidBeforeInstallPromptAction = Action & { - event: BeforeInstallPromptEvent; -}; +export type AppDidBeforeInstallPromptAction = + Action & { + event: BeforeInstallPromptEvent; + }; /* Action that indicates the browser wants to prompt the use to install the app. */ export function didBeforeInstallPrompt( diff --git a/src/ble-pybricks-service/actions.ts b/src/ble-pybricks-service/actions.ts index 61cdb658..56748e13 100644 --- a/src/ble-pybricks-service/actions.ts +++ b/src/ble-pybricks-service/actions.ts @@ -29,10 +29,11 @@ export enum BlePybricksServiceActionType { /** * Action that request to write a command to the Pybricks service control characteristic. */ -export type BlePybricksServiceWriteCommandAction = Action & { - id: number; - value: Uint8Array; -}; +export type BlePybricksServiceWriteCommandAction = + Action & { + id: number; + value: Uint8Array; + }; /** * Action that request to write a command to the Pybricks service control characteristic. @@ -51,9 +52,10 @@ export function writeCommand( /** * Action that indicates sending a command to the Pybricks service control characteristic was successful. */ -export type BlePybricksServiceDidWriteCommandAction = Action & { - id: number; -}; +export type BlePybricksServiceDidWriteCommandAction = + Action & { + id: number; + }; /** * Action that indicates sending a command to the Pybricks service control characteristic was successful. @@ -68,10 +70,11 @@ export function didWriteCommand(id: number): BlePybricksServiceDidWriteCommandAc /** * Action that indicates sending a command to the Pybricks service control characteristic failed. */ -export type BlePybricksServiceDidFailToWriteCommandAction = Action & { - id: number; - err: Error; -}; +export type BlePybricksServiceDidFailToWriteCommandAction = + Action & { + id: number; + err: Error; + }; /** * Action that indicates sending a command to the Pybricks service control characteristic failed. @@ -90,9 +93,10 @@ export function didFailToWriteCommand( /** * Action that indicates an event notification was received on the Pybricks service control characteristic. */ -export type BlePybricksServiceDidNotifyEventAction = Action & { - value: DataView; -}; +export type BlePybricksServiceDidNotifyEventAction = + Action & { + value: DataView; + }; /** * Action that indicates an event notification was received on the Pybricks service control characteristic. @@ -126,8 +130,8 @@ type TransactionId = { }; /** Action that requests a stop user program to be sent. */ -export type BlePybricksServiceCommandSendStopUserProgram = Action & - TransactionId; +export type BlePybricksServiceCommandSendStopUserProgram = + Action & TransactionId; /** * Action that requests a stop user program to be sent. @@ -142,8 +146,8 @@ export function sendStopUserProgramCommand( /** * Action that indicates that a command was successfully sent. */ -export type BlePybricksServiceCommandDidSendAction = Action & - TransactionId; +export type BlePybricksServiceCommandDidSendAction = + Action & TransactionId; /** * Action that indicates that a command was successfully sent. @@ -156,11 +160,12 @@ export function didSendCommand(id: number): BlePybricksServiceCommandDidSendActi /** * Action that indicates that a command was not sent. */ -export type BlePybricksServiceCommandDidFailToSendAction = Action & - TransactionId & { - /** The error that was raised. */ - err: Error; - }; +export type BlePybricksServiceCommandDidFailToSendAction = + Action & + TransactionId & { + /** The error that was raised. */ + err: Error; + }; /** * Action that indicates that a command was not sent. @@ -191,9 +196,10 @@ export enum BlePybricksServiceEventActionType { /** * Action that represents a status report event received from the hub. */ -export type BlePybricksServiceEventStatusReportAction = Action & { - statusFlags: number; -}; +export type BlePybricksServiceEventStatusReportAction = + Action & { + statusFlags: number; + }; /** * Action that represents a status report event received from the hub. @@ -208,9 +214,10 @@ export function statusReportEvent( /** * Pseudo-event (not received from hub) indicating that there was a protocol error. */ -export type BlePybricksServiceEventProtocolErrorAction = Action & { - err: Error; -}; +export type BlePybricksServiceEventProtocolErrorAction = + Action & { + err: Error; + }; /** * Pseudo-event (not received from hub) indicating that there was a protocol error. diff --git a/src/ble/actions.ts b/src/ble/actions.ts index aa1a5ce6..f11b1ef2 100644 --- a/src/ble/actions.ts +++ b/src/ble/actions.ts @@ -67,21 +67,28 @@ type Reason = { reason: T; }; -export type BleDeviceFailToConnectNoWebBluetoothReason = Reason; +export type BleDeviceFailToConnectNoWebBluetoothReason = + Reason; -export type BleDeviceFailToConnectNoBluetoothReason = Reason; +export type BleDeviceFailToConnectNoBluetoothReason = + Reason; -export type BleDeviceFailToConnectCanceledReason = Reason; +export type BleDeviceFailToConnectCanceledReason = + Reason; -export type BleDeviceFailToConnectNoGattReason = Reason; +export type BleDeviceFailToConnectNoGattReason = + Reason; -export type BleDeviceFailToConnectNoDeviceInfoServiceReason = Reason; +export type BleDeviceFailToConnectNoDeviceInfoServiceReason = + Reason; -export type BleDeviceFailToConnectNoPybricksServiceReason = Reason; +export type BleDeviceFailToConnectNoPybricksServiceReason = + Reason; -export type BleDeviceFailToConnectUnknownReason = Reason & { - err: Error; -}; +export type BleDeviceFailToConnectUnknownReason = + Reason & { + err: Error; + }; export type BleDeviceDidFailToConnectReason = | BleDeviceFailToConnectNoWebBluetoothReason @@ -92,8 +99,8 @@ export type BleDeviceDidFailToConnectReason = | BleDeviceFailToConnectNoPybricksServiceReason | BleDeviceFailToConnectUnknownReason; -export type BleDeviceDidFailToConnectAction = Action & - BleDeviceDidFailToConnectReason; +export type BleDeviceDidFailToConnectAction = + Action & BleDeviceDidFailToConnectReason; /** * Creates an action that indicates a device failed to connect. @@ -122,7 +129,8 @@ export function didDisconnect(): BleDeviceDidDisconnectAction { return { type: BleDeviceActionType.DidDisconnect }; } -export type BleDeviceDidFailToDisconnectAction = Action; +export type BleDeviceDidFailToDisconnectAction = + Action; /** * Creates an action that indicates a device failed to disconnect. diff --git a/src/editor/Editor.test.tsx b/src/editor/Editor.test.tsx index a0b838e4..e2e98a54 100644 --- a/src/editor/Editor.test.tsx +++ b/src/editor/Editor.test.tsx @@ -21,11 +21,11 @@ function getTextArea(): HTMLTextAreaElement { } it('should focus the text area', () => { - const store = ({ + const store = { getState: jest.fn(() => ({ settings: { darkMode: false, showDocs: false } })), dispatch: jest.fn(), subscribe: jest.fn(), - } as unknown) as Store; + } as unknown as Store; const i18n = new I18nManager({ locale: 'en' }); render( @@ -40,13 +40,13 @@ it('should focus the text area', () => { describe('context menu', () => { it('should show the context menu', () => { - const store = ({ + const store = { getState: jest.fn(() => ({ settings: { darkMode: false, showDocs: false }, })), dispatch: jest.fn(), subscribe: jest.fn(), - } as unknown) as Store; + } as unknown as Store; const i18n = new I18nManager({ locale: 'en' }); render( @@ -63,13 +63,13 @@ describe('context menu', () => { }); it('should hide the context menu when Escape is pressed', async () => { - const store = ({ + const store = { getState: jest.fn(() => ({ settings: { darkMode: false, showDocs: false }, })), dispatch: jest.fn(), subscribe: jest.fn(), - } as unknown) as Store; + } as unknown as Store; const i18n = new I18nManager({ locale: 'en' }); render( diff --git a/src/firmware/actions.ts b/src/firmware/actions.ts index d02cd4e5..8839f575 100644 --- a/src/firmware/actions.ts +++ b/src/firmware/actions.ts @@ -71,7 +71,8 @@ type Reason = { reason: T; }; -export type FailToFinishReasonFailedToConnect = Reason; +export type FailToFinishReasonFailedToConnect = + Reason; export type FailToFinishReasonTimedOut = Reason; @@ -79,7 +80,8 @@ export type FailToFinishReasonBleError = Reason err: Error; }; -export type FailToFinishReasonDisconnected = Reason; +export type FailToFinishReasonDisconnected = + Reason; export type FailToFinishReasonHubError = Reason & { hubError: HubError; @@ -87,24 +89,29 @@ export type FailToFinishReasonHubError = Reason export type FailToFinishReasonNoFirmware = Reason; -export type FailToFinishReasonDeviceMismatch = Reason; +export type FailToFinishReasonDeviceMismatch = + Reason; -export type FailToFinishReasonFailedToFetch = Reason & { - response: Response; -}; +export type FailToFinishReasonFailedToFetch = + Reason & { + response: Response; + }; export type FailToFinishReasonZipError = Reason & { err: FirmwareReaderError; }; -export type FailToFinishReasonBadMetadata = Reason & { - property: keyof FirmwareMetadata; - problem: MetadataProblem; -}; +export type FailToFinishReasonBadMetadata = + Reason & { + property: keyof FirmwareMetadata; + problem: MetadataProblem; + }; -export type FailToFinishReasonFirmwareSize = Reason; +export type FailToFinishReasonFirmwareSize = + Reason; -export type FailToFinishReasonFailedToCompile = Reason; +export type FailToFinishReasonFailedToCompile = + Reason; export type FailToFinishReasonUnknown = Reason & { err: Error; @@ -153,10 +160,11 @@ export function didStart(): FlashFirmwareDidStartAction { } /** Action that indicates current firmware flashing progress. */ -export type FlashFirmwareDidProgressAction = Action & { - /** The current progress (0 to 1). */ - value: number; -}; +export type FlashFirmwareDidProgressAction = + Action & { + /** The current progress (0 to 1). */ + value: number; + }; /** * Action that indicates current firmware flashing progress. @@ -176,9 +184,10 @@ export function didFinish(): FlashFirmwareDidFinishAction { } /** Action that indicates that flashing failed. */ -export type FlashFirmwareDidFailToFinishAction = Action & { - reason: FailToFinishReason; -}; +export type FlashFirmwareDidFailToFinishAction = + Action & { + reason: FailToFinishReason; + }; export function didFailToFinish( reason: FailToFinishReasonType.BleError, diff --git a/src/hub/actions.ts b/src/hub/actions.ts index 5cea0641..6480cb72 100644 --- a/src/hub/actions.ts +++ b/src/hub/actions.ts @@ -65,7 +65,8 @@ export function didFinishDownload(): HubDidFinishDownloadAction { return { type: HubActionType.DidFinishDownload }; } -export type HubDidFailToFinishDownloadAction = Action; +export type HubDidFailToFinishDownloadAction = + Action; export function didFailToFinishDownload(): HubDidFailToFinishDownloadAction { return { type: HubActionType.DidFailToFinishDownload }; diff --git a/src/hub/sagas.ts b/src/hub/sagas.ts index 9b1ca0e5..878e02d3 100644 --- a/src/hub/sagas.ts +++ b/src/hub/sagas.ts @@ -51,9 +51,7 @@ import { const downloadChunkSize = 100; -function* waitForWrite( - id: number, -): SagaGenerator<{ +function* waitForWrite(id: number): SagaGenerator<{ didWrite: BleUartDidWriteAction | undefined; didFailToWrite: BleUartDidFailToWriteAction | undefined; }> { diff --git a/src/licenses/actions.ts b/src/licenses/actions.ts index 748188fa..58b99521 100644 --- a/src/licenses/actions.ts +++ b/src/licenses/actions.ts @@ -25,9 +25,10 @@ export function didFetchList(list: LicenseList): LicenseDidFetchListAction { return { type: LicenseActionType.DidFetchList, list }; } -export type LicenseDidFailToFetchListAction = Action & { - reason: Response; -}; +export type LicenseDidFailToFetchListAction = + Action & { + reason: Response; + }; export function didFailToFetchList(reason: Response): LicenseDidFailToFetchListAction { return { type: LicenseActionType.DidFailToFetchList, reason }; diff --git a/src/lwp3-bootloader/actions.ts b/src/lwp3-bootloader/actions.ts index 64bd021d..5ed466ef 100644 --- a/src/lwp3-bootloader/actions.ts +++ b/src/lwp3-bootloader/actions.ts @@ -54,19 +54,22 @@ export enum BootloaderConnectionActionType { DidFailToDisconnect = 'bootloader.action.connection.did.failToDisconnect', } -export type BootloaderConnectionConnectAction = Action; +export type BootloaderConnectionConnectAction = + Action; export function connect(): BootloaderConnectionConnectAction { return { type: BootloaderConnectionActionType.Connect }; } -export type BootloaderConnectionDidConnectAction = Action; +export type BootloaderConnectionDidConnectAction = + Action; export function didConnect(): BootloaderConnectionDidConnectAction { return { type: BootloaderConnectionActionType.DidConnect }; } -export type BootloaderConnectionDisconnectAction = Action; +export type BootloaderConnectionDisconnectAction = + Action; export function disconnect(): BootloaderConnectionDisconnectAction { return { type: BootloaderConnectionActionType.Disconnect }; @@ -92,17 +95,22 @@ type Reason = { reason: T; }; -export type BootloaderConnectionFailToConnectNoWebBluetoothReason = Reason; +export type BootloaderConnectionFailToConnectNoWebBluetoothReason = + Reason; -export type BootloaderConnectionFailToConnectNoBluetoothReason = Reason; +export type BootloaderConnectionFailToConnectNoBluetoothReason = + Reason; -export type BootloaderConnectionFailToConnectGattServiceNotFoundReason = Reason; +export type BootloaderConnectionFailToConnectGattServiceNotFoundReason = + Reason; -export type BootloaderConnectionFailToConnectCanceledReason = Reason; +export type BootloaderConnectionFailToConnectCanceledReason = + Reason; -export type BootloaderConnectionFailToConnectUnknownReason = Reason & { - err: Error; -}; +export type BootloaderConnectionFailToConnectUnknownReason = + Reason & { + err: Error; + }; export type BootloaderConnectionDidFailToConnectReason = | BootloaderConnectionFailToConnectNoWebBluetoothReason @@ -111,8 +119,9 @@ export type BootloaderConnectionDidFailToConnectReason = | BootloaderConnectionFailToConnectCanceledReason | BootloaderConnectionFailToConnectUnknownReason; -export type BootloaderConnectionDidFailToConnectAction = Action & - BootloaderConnectionDidFailToConnectReason; +export type BootloaderConnectionDidFailToConnectAction = + Action & + BootloaderConnectionDidFailToConnectReason; export function didFailToConnect( reason: Exclude< @@ -140,18 +149,20 @@ export function didFailToConnect( return { type: BootloaderConnectionActionType.DidFailToConnect, reason }; } -export type BootloaderConnectionDidErrorAction = Action & { - err: Error; -}; +export type BootloaderConnectionDidErrorAction = + Action & { + err: Error; + }; export function didError(err: Error): BootloaderConnectionDidErrorAction { return { type: BootloaderConnectionActionType.DidError, err }; } -export type BootloaderConnectionSendAction = Action & { - readonly data: ArrayBuffer; - readonly withResponse: boolean; -}; +export type BootloaderConnectionSendAction = + Action & { + readonly data: ArrayBuffer; + readonly withResponse: boolean; + }; export function send( data: ArrayBuffer, @@ -160,35 +171,40 @@ export function send( return { type: BootloaderConnectionActionType.Send, data, withResponse }; } -export type BootloaderConnectionDidSendAction = Action; +export type BootloaderConnectionDidSendAction = + Action; export function didSend(): BootloaderConnectionDidSendAction { return { type: BootloaderConnectionActionType.DidSend }; } -export type BootloaderConnectionDidFailToSendAction = Action & { - err: Error; -}; +export type BootloaderConnectionDidFailToSendAction = + Action & { + err: Error; + }; export function didFailToSend(err: Error): BootloaderConnectionDidFailToSendAction { return { type: BootloaderConnectionActionType.DidFailToSend, err }; } -export type BootloaderConnectionDidReceiveAction = Action & { - data: DataView; -}; +export type BootloaderConnectionDidReceiveAction = + Action & { + data: DataView; + }; export function didReceive(data: DataView): BootloaderConnectionDidReceiveAction { return { type: BootloaderConnectionActionType.DidReceive, data }; } -export type BootloaderConnectionDidDisconnectAction = Action; +export type BootloaderConnectionDidDisconnectAction = + Action; export function didDisconnect(): BootloaderConnectionDidDisconnectAction { return { type: BootloaderConnectionActionType.DidDisconnect }; } -export type BootloaderConnectionDidFailToDisconnectAction = Action; +export type BootloaderConnectionDidFailToDisconnectAction = + Action; export function didFailToDisconnect(): BootloaderConnectionDidFailToDisconnectAction { return { type: BootloaderConnectionActionType.DidFailToDisconnect }; @@ -234,7 +250,8 @@ type BaseBootloaderRequestAction = Action /** * Action that requests to erase the flash memory. */ -export type BootloaderEraseRequestAction = BaseBootloaderRequestAction; +export type BootloaderEraseRequestAction = + BaseBootloaderRequestAction; /** * Creates a request to erase the flash memory. @@ -246,10 +263,11 @@ export function eraseRequest(id: number): BootloaderEraseRequestAction { /** * Action that requests to program the flash memory. */ -export type BootloaderProgramRequestAction = BaseBootloaderRequestAction & { - address: number; - payload: ArrayBuffer; -}; +export type BootloaderProgramRequestAction = + BaseBootloaderRequestAction & { + address: number; + payload: ArrayBuffer; + }; /** * Creates a request to program the flash memory. @@ -272,7 +290,8 @@ export function programRequest( /** * Action that requests to reboot the hub. */ -export type BootloaderRebootRequestAction = BaseBootloaderRequestAction; +export type BootloaderRebootRequestAction = + BaseBootloaderRequestAction; /** * Creates a request to reboot the hub. @@ -284,9 +303,10 @@ export function rebootRequest(id: number): BootloaderRebootRequestAction { /** * Action that requests to initialize the firmware flashing process. */ -export type BootloaderInitRequestAction = BaseBootloaderRequestAction & { - firmwareSize: number; -}; +export type BootloaderInitRequestAction = + BaseBootloaderRequestAction & { + firmwareSize: number; + }; /** * Creates a request to initialize the firmware flashing process. @@ -306,7 +326,8 @@ export function initRequest( /** * Action that requests information about the hub. */ -export type BootloaderInfoRequestAction = BaseBootloaderRequestAction; +export type BootloaderInfoRequestAction = + BaseBootloaderRequestAction; /** * Creates a request to get information about the hub. @@ -319,7 +340,8 @@ export function infoRequest(id: number): BootloaderInfoRequestAction { * Action to get the checksum of the bytes that have been written to flash * so far. */ -export type BootloaderChecksumRequestAction = BaseBootloaderRequestAction; +export type BootloaderChecksumRequestAction = + BaseBootloaderRequestAction; /** * Creates a request to get the checksum of the bytes that have been written @@ -332,7 +354,8 @@ export function checksumRequest(id: number): BootloaderChecksumRequestAction { /** * Action that requests the bootloader flash memory protection state. */ -export type BootloaderStateRequestAction = BaseBootloaderRequestAction; +export type BootloaderStateRequestAction = + BaseBootloaderRequestAction; /** * Creates a request to get the bootloader flash memory protection state. @@ -344,7 +367,8 @@ export function stateRequest(id: number): BootloaderStateRequestAction { /** * Action that requests to disconnect the hub. */ -export type BootloaderDisconnectRequestAction = BaseBootloaderRequestAction; +export type BootloaderDisconnectRequestAction = + BaseBootloaderRequestAction; /** * Creates a request to disconnect the hub. @@ -407,16 +431,17 @@ export const BootloaderDidFailToRequestType = 'bootloader.action.did.failToReque /** * Action that indicates a request failed to send. */ -export type BootloaderDidFailToRequestAction = Action & { - /** - * The unique identifier of the action. - */ - id: number; - /** - * The error. - */ - err: Error; -}; +export type BootloaderDidFailToRequestAction = + Action & { + /** + * The unique identifier of the action. + */ + id: number; + /** + * The error. + */ + err: Error; + }; /** * Creates an action that indicates a request failed to send. @@ -443,18 +468,20 @@ export enum BootloaderResponseActionType { Error = 'bootloader.action.response.error', } -export type BootloaderEraseResponseAction = Action & { - result: Result; -}; +export type BootloaderEraseResponseAction = + Action & { + result: Result; + }; export function eraseResponse(result: Result): BootloaderEraseResponseAction { return { type: BootloaderResponseActionType.Erase, result }; } -export type BootloaderProgramResponseAction = Action & { - checksum: number; - count: number; -}; +export type BootloaderProgramResponseAction = + Action & { + checksum: number; + count: number; + }; export function programResponse( checksum: number, @@ -493,25 +520,28 @@ export function infoResponse( }; } -export type BootloaderChecksumResponseAction = Action & { - checksum: number; -}; +export type BootloaderChecksumResponseAction = + Action & { + checksum: number; + }; export function checksumResponse(checksum: number): BootloaderChecksumResponseAction { return { type: BootloaderResponseActionType.Checksum, checksum }; } -export type BootloaderStateResponseAction = Action & { - level: ProtectionLevel; -}; +export type BootloaderStateResponseAction = + Action & { + level: ProtectionLevel; + }; export function stateResponse(level: ProtectionLevel): BootloaderStateResponseAction { return { type: BootloaderResponseActionType.State, level }; } -export type BootloaderErrorResponseAction = Action & { - command: Command; -}; +export type BootloaderErrorResponseAction = + Action & { + command: Command; + }; export function errorResponse(command: Command): BootloaderErrorResponseAction { return { type: BootloaderResponseActionType.Error, command }; diff --git a/src/service-worker/actions.ts b/src/service-worker/actions.ts index 25386eb5..dc113950 100644 --- a/src/service-worker/actions.ts +++ b/src/service-worker/actions.ts @@ -9,7 +9,7 @@ export enum ServiceWorkerActionType { } export type ServiceWorkerAction< - T extends ServiceWorkerActionType = ServiceWorkerActionType + T extends ServiceWorkerActionType = ServiceWorkerActionType, > = Action & { registration: ServiceWorkerRegistration; }; diff --git a/src/settings/actions.ts b/src/settings/actions.ts index 2ea917bf..47959b37 100644 --- a/src/settings/actions.ts +++ b/src/settings/actions.ts @@ -39,10 +39,11 @@ export function toggleBoolean(id: SettingId): SettingsToggleBooleanAction { } /** Action that indicates setting/storing a setting failed. */ -export type SettingsDidFailToSetBooleanAction = Action & { - id: SettingId; - err: Error; -}; +export type SettingsDidFailToSetBooleanAction = + Action & { + id: SettingId; + err: Error; + }; /** Creates an action indicating that setting/storing a setting failed. */ export function didFailToSetBoolean( @@ -53,8 +54,8 @@ export function didFailToSetBoolean( } /** Action that indicates a stored boolean setting value changed. */ -export type SettingsDidBooleanChangeAction = Action & - SettingInfo; +export type SettingsDidBooleanChangeAction = + Action & SettingInfo; /** Creates an action that indicates a stored boolean setting value changed. */ export function didBooleanChange( diff --git a/src/status-bar/StatusBar.test.tsx b/src/status-bar/StatusBar.test.tsx index bc00dff2..8cbfba70 100644 --- a/src/status-bar/StatusBar.test.tsx +++ b/src/status-bar/StatusBar.test.tsx @@ -5,11 +5,11 @@ import { Store } from 'redux'; import StatusBar from './StatusBar'; it('should prevent browser context menu', () => { - const store = ({ + const store = { getState: jest.fn(), dispatch: jest.fn(), subscribe: jest.fn(), - } as unknown) as Store; + } as unknown as Store; render(