Загрузка данных
FAIL src/widgets/Chart/__tests__/dataSourceProvide.test.ts (21.043 s)
● DataSourceProvider › should request realtime data and update normalized symbol
expect(jest.fn()).toHaveBeenCalledWith(...expected)
- Expected
+ Received
- "MOEX:SBER",
+ "moex:sber",
{"close": 110, "high": 120, "low": 90, "open": 100, "time": 1640995200, "volume": 90},
Number of calls: 1
253 | indicativeData: undefined,
254 | });
> 255 | expect(mockUpdate).toHaveBeenCalledWith('MOEX:SBER', localMockedBar);
| ^
256 | });
257 |
258 | it('should request realtime data with indicative data', async () => {
at Object.<anonymous> (src/widgets/Chart/__tests__/dataSourceProvide.test.ts:255:24)
PASS src/widgets/Chart/__tests__/useChartPublicContext.test.tsx (21.543 s)
PASS src/widgets/Chart/__tests__/requestBars.test.ts
● Console
console.error
error from requestRealTimeBars indicativeQuotesController: Error: API Error
at Object.<anonymous> (C:\Users\ShkinderDV\moex-terminal-front\src\widgets\Chart\__tests__\requestBars.test.ts:570:25)
at Promise.then.completed (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\utils.js:298:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\utils.js:231:10)
at _callCircusTest (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\run.js:316:40)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at _runTest (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\run.js:252:3)
at _runTestsForDescribeBlock (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\run.js:126:9)
at _runTestsForDescribeBlock (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\run.js:121:9)
at run (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\run.js:71:3)
at runAndTransformResultsToJestFormat (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\legacy-code-todo-rewrite\jestAdapterInit.js:122:21)
at jestAdapter (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\legacy-code-todo-rewrite\jestAdapter.js:79:19)
at runTestInternal (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-runner\build\runTest.js:367:16)
at runTest (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-runner\build\runTest.js:444:34)
at Object.worker (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-runner\build\testWorker.js:106:12)
161 | return bar;
162 | } catch (error) {
> 163 | console.error('error from requestRealTimeBars indicativeQuotesController: ', error);
| ^
164 |
165 | return undefined;
166 | }
at requestRealtimeBars (src/widgets/Chart/requestBars.ts:163:15)
at Object.<anonymous> (src/widgets/Chart/__tests__/requestBars.test.ts:575:5)
console.error
error from requestRealTimeBars: Error: API Error
at Object.<anonymous> (C:\Users\ShkinderDV\moex-terminal-front\src\widgets\Chart\__tests__\requestBars.test.ts:590:7)
at Promise.then.completed (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\utils.js:298:28)
at new Promise (<anonymous>)
at callAsyncCircusFn (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\utils.js:231:10)
at _callCircusTest (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\run.js:316:40)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at _runTest (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\run.js:252:3)
at _runTestsForDescribeBlock (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\run.js:126:9)
at _runTestsForDescribeBlock (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\run.js:121:9)
at run (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\run.js:71:3)
at runAndTransformResultsToJestFormat (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\legacy-code-todo-rewrite\jestAdapterInit.js:122:21)
at jestAdapter (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-circus\build\legacy-code-todo-rewrite\jestAdapter.js:79:19)
at runTestInternal (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-runner\build\runTest.js:367:16)
at runTest (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-runner\build\runTest.js:444:34)
at Object.worker (C:\Users\ShkinderDV\moex-terminal-front\node_modules\jest-runner\build\testWorker.js:106:12)
196 | return bar;
197 | } catch (error) {
> 198 | console.error('error from requestRealTimeBars: ', error);
| ^
199 |
200 | return undefined;
201 | }
at requestRealtimeBars (src/widgets/Chart/requestBars.ts:198:13)
at Object.<anonymous> (src/widgets/Chart/__tests__/requestBars.test.ts:596:5)
PASS src/widgets/Chart/__tests__/SymbolSearchModal.test.tsx
PASS src/widgets/Chart/__tests__/MoexChart.test.tsx
PASS src/widgets/Chart/__tests__/useChartComponentFacade.test.tsx (5.758 s)
PASS src/widgets/Chart/__tests__/CompareModal.test.tsx
FAIL src/widgets/Chart/__tests__/useMoexChart.test.tsx (31.139 s)
● useMoexChart › should initialize indicative instrument with id, name and ticker
expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: "2xOFZ:INAV", "Индикатив Расчётный", "INAV"
Number of calls: 0
739 | // Assert
740 | expect(mockGetDataSource).toHaveBeenCalledWith(indicativeData, expect.any(Function));
> 741 | expect(mockSetSymbol).toHaveBeenCalledWith('2xOFZ:INAV', 'Индикатив Расчётный', 'INAV');
| ^
742 | });
743 |
744 | it('should pass realtime params to data source provider', () => {
at Object.<anonymous> (src/widgets/Chart/__tests__/useMoexchart.test.tsx:741:27)
Test Suites: 2 failed, 6 passed, 8 total
Tests: 2 failed, 101 passed, 103 total
Snapshots: 0 total
Time: 32.644 s, estimated 64 s
Ran all test suites within paths "src/widgets/Chart/__tests__/CompareModal.test.tsx", "src/widgets/Chart/__tests__/dataSourceProvide.test.ts", "src/widgets/Chart/__tests__/MoexChart.test.tsx", "src/widgets/Chart/__tests__/requestBars.test.ts", "src/widgets/Chart/__tests__/SymbolSearchModal.test.tsx", "src/widgets/Chart/__tests__/useChartComponentFacade.test.tsx", "src/widgets/Chart/__tests__/useChartPublicContext.test.tsx", "src/widgets/Chart/__tests__/useMoexChart.test.tsx".