diff --git a/web/src/components/Diagram/components/DAG.tsx b/web/src/components/Diagram/components/DAG.tsx index f5ffdc4260..f428ae7999 100644 --- a/web/src/components/Diagram/components/DAG.tsx +++ b/web/src/components/Diagram/components/DAG.tsx @@ -1,4 +1,4 @@ -import {useCallback, useEffect, useMemo} from 'react'; +import React, {useCallback, useEffect, useMemo} from 'react'; import ReactFlow, {Background, FlowElement} from 'react-flow-renderer'; import {useDAGChart} from '../../../hooks/useDAGChart'; import TraceNode from '../../TraceNode'; @@ -29,6 +29,7 @@ const Diagram: React.FC = ({trace, selectedSpan, onSelectSpan}): ); }, [trace?.spans]); + console.log(spanMap); const dagLayout = useDAGChart(spanMap); const handleElementClick = useCallback( diff --git a/web/src/components/ErrorBoundary/__test__/ErrorBoundary.test.tsx b/web/src/components/ErrorBoundary/__test__/ErrorBoundary.test.tsx index 247a7d8dd2..554d5a1cca 100644 --- a/web/src/components/ErrorBoundary/__test__/ErrorBoundary.test.tsx +++ b/web/src/components/ErrorBoundary/__test__/ErrorBoundary.test.tsx @@ -2,6 +2,7 @@ import {render} from '@testing-library/react'; import ErrorBoundary from '../ErrorBoundary'; test('ErrorBoundary', () => { - const result = render(); - expect(result.container).toMatchSnapshot(); + const errorMsg = 'cannot find value of undefined'; + const {getByText} = render(); + expect(getByText('Something went wrong!')).toBeTruthy(); }); diff --git a/web/src/components/ErrorBoundary/__test__/__snapshots__/ErrorBoundary.test.tsx.snap b/web/src/components/ErrorBoundary/__test__/__snapshots__/ErrorBoundary.test.tsx.snap deleted file mode 100644 index 5f0e12647a..0000000000 --- a/web/src/components/ErrorBoundary/__test__/__snapshots__/ErrorBoundary.test.tsx.snap +++ /dev/null @@ -1,40 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ErrorBoundary 1`] = ` -
-
- - - -

- Something went wrong! -

-
- Error: cannot find value of undefined -
-
-
-`; diff --git a/web/src/components/FailedTrace/__tests__/FailedTrace.test.tsx b/web/src/components/FailedTrace/__tests__/FailedTrace.test.tsx index 0a60c6ef78..4ad1a01d6b 100644 --- a/web/src/components/FailedTrace/__tests__/FailedTrace.test.tsx +++ b/web/src/components/FailedTrace/__tests__/FailedTrace.test.tsx @@ -2,14 +2,16 @@ import {render} from '@testing-library/react'; import {MemoryRouter} from 'react-router-dom'; import FailedTrace from '../index'; import {ReduxWrapperProvider} from '../../../redux/ReduxWrapperProvider'; +import TestMock from '../../../models/__mocks__/Test.mock'; test('FailedTrace', () => { - const result = render( + const test = TestMock.model(); + const {getByText} = render( - + ); - expect(result.container).toMatchSnapshot(); + expect(getByText('Rerun Test')).toBeTruthy(); }); diff --git a/web/src/components/FailedTrace/__tests__/__snapshots__/FailedTrace.test.tsx.snap b/web/src/components/FailedTrace/__tests__/__snapshots__/FailedTrace.test.tsx.snap deleted file mode 100644 index f8fde51a3c..0000000000 --- a/web/src/components/FailedTrace/__tests__/__snapshots__/FailedTrace.test.tsx.snap +++ /dev/null @@ -1,91 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`FailedTrace 1`] = ` -
-
-
- - - -
-

- Test Run Failed -

- - Information explaining the state the test failed at. - - - Please let us know about this issue - - - create an issue - - or contact us via - - - Discord - - . - - - We will check it out and respond to you. - -
-
- - -
-
-
-
-`; diff --git a/web/src/components/Layout/__tests__/Layout.test.tsx b/web/src/components/Layout/__tests__/Layout.test.tsx index 7bf941ddef..7fbb9f70ba 100644 --- a/web/src/components/Layout/__tests__/Layout.test.tsx +++ b/web/src/components/Layout/__tests__/Layout.test.tsx @@ -3,7 +3,7 @@ import {MemoryRouter} from 'react-router-dom'; import Layout from '../index'; test('Layout', async () => { - const {container, getByTestId} = render( + const {getByText, getByTestId} = render(

This

@@ -11,5 +11,5 @@ test('Layout', async () => {
); await waitFor(() => getByTestId('github-link')); - expect(container).toMatchSnapshot(); + expect(getByText('This')).toBeTruthy(); }); diff --git a/web/src/components/Layout/__tests__/__snapshots__/Layout.test.tsx.snap b/web/src/components/Layout/__tests__/__snapshots__/Layout.test.tsx.snap deleted file mode 100644 index 08280004f3..0000000000 --- a/web/src/components/Layout/__tests__/__snapshots__/Layout.test.tsx.snap +++ /dev/null @@ -1,123 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Layout 1`] = ` -
-
- -

- tracetest_log -

-
- -
-
-

- This -

-
-
-`; diff --git a/web/src/components/Navigation/__tests__/Navigation.test.tsx b/web/src/components/Navigation/__tests__/Navigation.test.tsx index 3b84471bb7..919070fa33 100644 --- a/web/src/components/Navigation/__tests__/Navigation.test.tsx +++ b/web/src/components/Navigation/__tests__/Navigation.test.tsx @@ -9,12 +9,12 @@ jest.mock('../../../services/Analytics/Analytics.service', () => { }); test('Router', async () => { - const {container, getByTestId} = render( + const {getByText, getByTestId} = render( ); await waitFor(() => getByTestId('github-link')); - expect(container).toMatchSnapshot(); + expect(getByText('Documentation')).toBeTruthy(); }); diff --git a/web/src/components/Navigation/__tests__/__snapshots__/Navigation.test.tsx.snap b/web/src/components/Navigation/__tests__/__snapshots__/Navigation.test.tsx.snap deleted file mode 100644 index 05a98b6ff1..0000000000 --- a/web/src/components/Navigation/__tests__/__snapshots__/Navigation.test.tsx.snap +++ /dev/null @@ -1,187 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Router 1`] = ` -
-
- -

- tracetest_log -

-
- -
-
-
-

- All Tests -

-
- - - - - - - - -
- -
-
-
-
-
-
-`; diff --git a/web/src/components/SkeletonTable/__tests__/SkeletonTable.test.tsx b/web/src/components/SkeletonTable/__tests__/SkeletonTable.test.tsx index 1dc199b3d7..f754c10891 100644 --- a/web/src/components/SkeletonTable/__tests__/SkeletonTable.test.tsx +++ b/web/src/components/SkeletonTable/__tests__/SkeletonTable.test.tsx @@ -2,10 +2,10 @@ import {render} from '@testing-library/react'; import SkeletonTable from '../SkeletonTable'; test('SkeletonTable', () => { - const result = render( + const {getByText} = render(

Whatever

); - expect(result.container).toMatchSnapshot(); + expect(getByText('Whatever')).toBeTruthy(); }); diff --git a/web/src/components/SkeletonTable/__tests__/__snapshots__/SkeletonTable.test.tsx.snap b/web/src/components/SkeletonTable/__tests__/__snapshots__/SkeletonTable.test.tsx.snap deleted file mode 100644 index 19bbf34d68..0000000000 --- a/web/src/components/SkeletonTable/__tests__/__snapshots__/SkeletonTable.test.tsx.snap +++ /dev/null @@ -1,11 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`SkeletonTable 1`] = ` -
-
-

- Whatever -

-
-
-`; diff --git a/web/src/components/SpanDetail/__tests__/TraceAssertionsTable.test.tsx b/web/src/components/SpanDetail/__tests__/TraceAssertionsTable.test.tsx index 2e1f41506b..fccf8b5a1d 100644 --- a/web/src/components/SpanDetail/__tests__/TraceAssertionsTable.test.tsx +++ b/web/src/components/SpanDetail/__tests__/TraceAssertionsTable.test.tsx @@ -5,10 +5,10 @@ import {ReduxWrapperProvider} from '../../../redux/ReduxWrapperProvider'; import SpanDetail from '../SpanDetail'; test('Layout', () => { - const result = render( + const {getByText} = render( ); - expect(result.container).toMatchSnapshot(); + expect(getByText('Attribute list')).toBeTruthy(); }); diff --git a/web/src/components/SpanDetail/__tests__/__snapshots__/TraceAssertionsTable.test.tsx.snap b/web/src/components/SpanDetail/__tests__/__snapshots__/TraceAssertionsTable.test.tsx.snap deleted file mode 100644 index 3483449cb9..0000000000 --- a/web/src/components/SpanDetail/__tests__/__snapshots__/TraceAssertionsTable.test.tsx.snap +++ /dev/null @@ -1,180 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Layout 1`] = ` -
-
-
-
- Span Details -
- - General • mock • span-mock - -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
- - service.name - -
- - mock - -
-
-
-
- - name - -
- - span-mock - -
-
-
-
- - tracetest.span.duration - -
- - 10 - -
-
-
-
-
-
-
-
-
-`; diff --git a/web/src/components/TestCard/TestCard.styled.ts b/web/src/components/TestCard/TestCard.styled.ts index 846a12ec28..989d2fb708 100644 --- a/web/src/components/TestCard/TestCard.styled.ts +++ b/web/src/components/TestCard/TestCard.styled.ts @@ -2,10 +2,10 @@ import {MoreOutlined} from '@ant-design/icons'; import {Button, Typography} from 'antd'; import styled from 'styled-components'; -export const TestCard = styled.div<{isCollapsed: boolean}>` +export const TestCard = styled.div<{$isCollapsed: boolean}>` box-shadow: 0 4px 8px rgba(153, 155, 168, 0.1); background: #fff; - border-left: ${({isCollapsed}) => isCollapsed && `2px solid #61175E`}; + border-left: ${({$isCollapsed}) => $isCollapsed && `2px solid #61175E`}; border-radius: 2px; `; diff --git a/web/src/components/TestCard/TestCard.tsx b/web/src/components/TestCard/TestCard.tsx index b1c089a1e8..70124417c9 100644 --- a/web/src/components/TestCard/TestCard.tsx +++ b/web/src/components/TestCard/TestCard.tsx @@ -1,6 +1,6 @@ import {DownOutlined, RightOutlined} from '@ant-design/icons'; import {Button} from 'antd'; -import {useCallback, useState} from 'react'; +import React, {useCallback, useState} from 'react'; import {useLazyGetRunListQuery} from '../../redux/apis/TraceTest.api'; import {TTest} from '../../types/Test.types'; import ResultCardList from '../RunCardList'; @@ -9,8 +9,11 @@ import TestCardActions from './TestCardActions'; interface TTestCardProps { test: TTest; + onClick(testId: string): void; + onDelete(test: TTest): void; + onRunTest(testId: string): void; } @@ -35,7 +38,7 @@ const TestCard: React.FC = ({ }, [loadResultList, resultList.length, testId]); return ( - + {isCollapsed ? ( setIsCollapsed(false)} /> diff --git a/web/src/components/TestCard/__tests__/TestActions.test.tsx b/web/src/components/TestCard/__tests__/TestActions.test.tsx index 97d3d49777..786aa04033 100644 --- a/web/src/components/TestCard/__tests__/TestActions.test.tsx +++ b/web/src/components/TestCard/__tests__/TestActions.test.tsx @@ -6,8 +6,6 @@ test('TestCardActions', async () => { const onDelete = jest.fn(); const testId = faker.datatype.uuid(); - const {getByTestId, container} = render(); + const {getByTestId} = render(); await waitFor(() => getByTestId(`test-actions-button-${testId}`)); - - expect(container).toMatchSnapshot(); }); diff --git a/web/src/components/TestCard/__tests__/TestCard.test.tsx b/web/src/components/TestCard/__tests__/TestCard.test.tsx index 7fa4c3d17b..9d9260d4fc 100644 --- a/web/src/components/TestCard/__tests__/TestCard.test.tsx +++ b/web/src/components/TestCard/__tests__/TestCard.test.tsx @@ -8,32 +8,16 @@ test('TestCard', async () => { const onRunTest = jest.fn(); const onClick = jest.fn(); -<<<<<<< Updated upstream const test = TestMock.model(); - const {container, getByTestId} = render( -======= const {getByTestId, getByText} = render( ->>>>>>> Stashed changes ); -<<<<<<< Updated upstream - fireEvent( - getByTestId(`test-actions-button-${test.id}`), - new MouseEvent('click', { - bubbles: true, - cancelable: true, - }) - ); + const mouseEvent = new MouseEvent('click', {bubbles: true}); + fireEvent(getByTestId(`test-actions-button-${test.id}`), mouseEvent); await waitFor(() => getByTestId('test-card-delete')); - expect(container).toMatchSnapshot(); -======= - fireEvent(getByTestId(`test-actions-button-${TestingModels.test.testId}`), TestingModels.mouseEvent); - await waitFor(() => getByTestId('delete')); - expect(getByText('GET')).toBeTruthy(); expect(getByText('Run Test')).toBeTruthy(); ->>>>>>> Stashed changes }); diff --git a/web/src/components/TestCard/__tests__/__snapshots__/TestCard.test.tsx.snap b/web/src/components/TestCard/__tests__/__snapshots__/TestCard.test.tsx.snap deleted file mode 100644 index 9d6facee5f..0000000000 --- a/web/src/components/TestCard/__tests__/__snapshots__/TestCard.test.tsx.snap +++ /dev/null @@ -1,100 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`TestCard 1`] = ` -
-
-
- - - -
- - Jamarcus - -
-
- -
-
- -
-
-
- -
- - - - - -
-
-
-`; diff --git a/web/src/components/TestHeader/__tests__/__snapshots__/TestHeader.test.tsx.snap b/web/src/components/TestHeader/__tests__/__snapshots__/TestHeader.test.tsx.snap deleted file mode 100644 index 58d3a2ea13..0000000000 --- a/web/src/components/TestHeader/__tests__/__snapshots__/TestHeader.test.tsx.snap +++ /dev/null @@ -1,74 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`SpanAttributesTable 1`] = ` -
-
-
- - - -

- Anabel - (v - ) -

- - - - -
-
- - Test status: - -
- - - - Created - - -
-
-
-
-`; diff --git a/web/src/components/Trace/__tests__/Trace.test.tsx b/web/src/components/Trace/__tests__/Trace.test.tsx index fe3794850b..5b80430cf9 100644 --- a/web/src/components/Trace/__tests__/Trace.test.tsx +++ b/web/src/components/Trace/__tests__/Trace.test.tsx @@ -1,22 +1,101 @@ import {render, waitFor} from '@testing-library/react'; import {ReactFlowProvider} from 'react-flow-renderer'; -import TestMock from '../../../models/__mocks__/Test.mock'; -import TestRunMock from '../../../models/__mocks__/TestRun.mock'; import {ReduxWrapperProvider} from '../../../redux/ReduxWrapperProvider'; import Trace from '../Trace'; +import {SemanticGroupNames} from '../../../constants/SemanticGroupNames.constants'; +import {TSpan} from '../../../types/Span.types'; +import {TTestRun} from '../../../types/TestRun.types'; +import {TTest} from '../../../types/Test.types'; +import {HTTP_METHOD} from '../../../constants/Common.constants'; + +const spanId = '4938u43'; + +const span: TSpan = { + attributeList: [], + attributes: {}, + duration: 0, + // endTimeUnixNano: '', + // kind: '', + name: '', + // parentSpanId: '', + signature: [ + { + // locationName: SemanticGroupNames.Http, + // propertyName: '', + key: '', + value: '', + // valueType: '', + }, + ], + id: spanId, + // startTimeUnixNano: '', + // status: {code: ''}, + // traceId: '', + type: SemanticGroupNames.Http, + children: [], + endTime: '', + startTime: '', +}; + +const testRunResult: TTestRun = { + executionTime: 0, + failedAssertionCount: 0, + passedAssertionCount: 0, + totalAssertionCount: 0, + + // assertionResult: [{assertionId: '', spanAssertionResults: []}], + // assertionResultState: false, + completedAt: '', + createdAt: new Date().toISOString().toString(), + response: undefined, + // resultId: '', + spanId: '', + state: 'CREATED', + // testId: '', + trace: { + traceId: '', + // traceId, + // description: '', + // resourceSpans: undefined, + spans: [span], + }, + result: { + allPassed: true, + resultList: [], + results: undefined, + }, + traceId: '', +}; +const ttest: TTest = { + // assertions: [], + description: '', + // lastTestResult: undefined, + name: '', + serviceUnderTest: { + // id: '', + request: { + auth: undefined, + body: '', + // certificate: undefined, + headers: undefined, + method: HTTP_METHOD.GET, + // proxy: undefined, + url: '', + }, + }, + definition: undefined, + id: '', + referenceTestRun: undefined, + + // testId, +}; test('Trace', async () => { const {getByText} = render(
- +
diff --git a/web/src/components/TraceNode/__tests__/TraceNode.test.tsx b/web/src/components/TraceNode/__tests__/TraceNode.test.tsx index 63aaeb04bb..a966ed3916 100644 --- a/web/src/components/TraceNode/__tests__/TraceNode.test.tsx +++ b/web/src/components/TraceNode/__tests__/TraceNode.test.tsx @@ -4,7 +4,7 @@ import SpanMock from '../../../models/__mocks__/Span.mock'; import TraceNode from '../TraceNode'; test('TraceNode', () => { - const result = render( + const {getByText} = render( { /> ); - expect(result.container).toMatchSnapshot(); + expect(getByText('General')).toBeTruthy(); }); diff --git a/web/src/components/TraceNode/__tests__/__snapshots__/TraceNode.test.tsx.snap b/web/src/components/TraceNode/__tests__/__snapshots__/TraceNode.test.tsx.snap deleted file mode 100644 index 78ea32ad00..0000000000 --- a/web/src/components/TraceNode/__tests__/__snapshots__/TraceNode.test.tsx.snap +++ /dev/null @@ -1,48 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`TraceNode 1`] = ` -
-
-
- - General - -
- -`; diff --git a/web/src/gateways/__tests__/Test.gateway.test.ts b/web/src/gateways/__tests__/Test.gateway.test.ts index ef353ea9e6..5c4149bf71 100644 --- a/web/src/gateways/__tests__/Test.gateway.test.ts +++ b/web/src/gateways/__tests__/Test.gateway.test.ts @@ -1,7 +1,7 @@ import {endpoints} from '../../redux/apis/TraceTest.api'; import TestGateway from '../Test.gateway'; -const {createTest, getTestById, getTestList, runTest} = endpoints; +const {createTest, getTestById, getTestList} = endpoints; jest.mock('../../redux/apis/TraceTest.api', () => { const initiate = jest.fn(() => Promise.resolve()); @@ -29,7 +29,7 @@ describe('TestGateway', () => { expect.assertions(1); await TestGateway.getById('testId'); - expect(getTestById.initiate).toBeCalledWith('testId'); + expect(getTestById.initiate).toBeCalledWith({testId: 'testId'}); }); it('should execute the getList function', async () => { @@ -43,6 +43,6 @@ describe('TestGateway', () => { expect.assertions(1); await TestGateway.run('testId'); - expect(runTest.initiate).toBeCalledWith('testId'); + expect(getTestById.initiate).toBeCalledWith({testId: 'testId'}); }); }); diff --git a/web/src/gateways/__tests__/TestRun.gateway.test.ts b/web/src/gateways/__tests__/TestRun.gateway.test.ts index e5d831b541..ddfaf5ab1f 100644 --- a/web/src/gateways/__tests__/TestRun.gateway.test.ts +++ b/web/src/gateways/__tests__/TestRun.gateway.test.ts @@ -25,18 +25,18 @@ describe('TestRunGateway', () => { it('should execute the getById function', async () => { expect.assertions(1); - await TestRunResultGateway.getById('testId', 'resultId'); + await TestRunResultGateway.getById('testId', 'runId'); - expect(getRunById.initiate).toBeCalledWith({testId: 'testId', resultId: 'resultId'}); + expect(getRunById.initiate).toBeCalledWith({testId: 'testId', runId: 'runId'}); }); it('should execute the update function', async () => { expect.assertions(1); - await TestRunResultGateway.reRun('testId', 'resultId'); + await TestRunResultGateway.reRun('testId', 'runId'); expect(reRun.initiate).toBeCalledWith({ testId: 'testId', - resultId: 'resultId', + runId: 'runId', }); }); }); diff --git a/web/src/models/__mocks__/Trace.mock.ts b/web/src/models/__mocks__/Trace.mock.ts index 3b505eb267..0056524c05 100644 --- a/web/src/models/__mocks__/Trace.mock.ts +++ b/web/src/models/__mocks__/Trace.mock.ts @@ -13,6 +13,7 @@ const TraceMock: IMockFactory = () => ({ '1': SpanMock.raw(), '2': SpanMock.raw(), }, + spans: [SpanMock.raw(), SpanMock.raw()], ...data, }; }, diff --git a/web/src/redux/apis/__tests__/useCreateTestMutation.tesx.tsx b/web/src/redux/apis/__tests__/useCreateTestMutation.tesx.tsx index 2962ea748e..c66b54d78a 100644 --- a/web/src/redux/apis/__tests__/useCreateTestMutation.tesx.tsx +++ b/web/src/redux/apis/__tests__/useCreateTestMutation.tesx.tsx @@ -1,26 +1,25 @@ import {act, renderHook} from '@testing-library/react-hooks'; import fetchMock from 'jest-fetch-mock'; import {HTTP_METHOD} from '../../../constants/Common.constants'; -import {TTest} from '../../../types/Test.types'; import {ReduxWrapperProvider} from '../../ReduxWrapperProvider'; import {useCreateTestMutation} from '../TraceTest.api'; +import TestMock from '../../../models/__mocks__/Test.mock'; test('useCreateTestMutation', async () => { - const testId = 22; - fetchMock.mockResponse(JSON.stringify({testId})); + const test = TestMock.model(); + fetchMock.mockResponse(JSON.stringify(test)); const {result} = renderHook(() => useCreateTestMutation(), { wrapper: ReduxWrapperProvider, }); - let newTest: TTest; await act(async () => { const [createTest] = result.current; - newTest = await createTest({ + const newTest = await createTest({ name: 'New test', serviceUnderTest: { request: {url: 'https://google.com', method: HTTP_METHOD.GET}, }, }).unwrap(); + expect(newTest!.id).toBe(test.id); }); - expect(newTest!.id).toBe(testId); }); diff --git a/web/src/redux/apis/__tests__/useRunTestMutation.tesx.tsx b/web/src/redux/apis/__tests__/useRunTestMutation.tesx.tsx index d1d466ee1a..c4f889fc63 100644 --- a/web/src/redux/apis/__tests__/useRunTestMutation.tesx.tsx +++ b/web/src/redux/apis/__tests__/useRunTestMutation.tesx.tsx @@ -1,6 +1,5 @@ import {act, renderHook} from '@testing-library/react-hooks'; import fetchMock from 'jest-fetch-mock'; -import {TTestRun} from '../../../types/TestRun.types'; import {ReduxWrapperProvider} from '../../ReduxWrapperProvider'; import {useRunTestMutation} from '../TraceTest.api'; @@ -16,19 +15,20 @@ test('useRunTestMutation', async () => { resultId: '', spanId: '', state: undefined, - testId: `${testId}`, + id: `${testId}`, trace: undefined, traceId: '', + allPassed: true, + result: {}, }) ); const {result} = renderHook(() => useRunTestMutation(), { wrapper: ReduxWrapperProvider, }); - let testResult: TTestRun; await act(async () => { const [runNewTest] = result.current; - testResult = await runNewTest({testId: `${testId}`}).unwrap(); + let testResult = await runNewTest({testId: `${testId}`}).unwrap(); + expect(testResult!.id).toBe(`${testId}`); }); - expect(testResult!.id).toBe(`${testId}`); });