fix jest setup for react helpers

This commit is contained in:
Matthew Russell 2022-03-08 12:10:43 -08:00
parent fdc5e68158
commit 74ac60fbfa
4 changed files with 8 additions and 2 deletions

View File

@ -6,4 +6,5 @@ module.exports = {
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/libs/react-helpers',
setupFilesAfterEnv: ['./jest.setup.js'],
};

View File

@ -0,0 +1,5 @@
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';

View File

@ -5,7 +5,7 @@ import { RestConnectorForm } from './rest-connector-form';
import { useEffect } from 'react';
import { RestConnector, useVegaWallet } from '.';
interface VegaConnectDialogProps {
export interface VegaConnectDialogProps {
connectors: { [name: string]: VegaConnector };
dialogOpen: boolean;
setDialogOpen: (isOpen: boolean) => void;

View File

@ -32,7 +32,7 @@ export class RestConnector implements VegaConnector {
configKey = WALLET_CONFIG;
apiConfig: Configuration;
service: DefaultApi;
description = 'Connects using REST to the Vega wallet desktop app';
description = 'Connects using REST to a running Vega wallet service';
constructor() {
const cfg = this.getConfig();