> job-tracker-ui@0.1.0 test > jest --runInBand --runTestsByPath src/jobs-view-integration.test.tsx -t localised matching count node.exe : FAIL src/jobs-view-integration.test.tsx (21.676 s) At line:1 char:1 + & "C:\Program Files\nodejs/node.exe" "C:\Program Files\nodejs/node_mo ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (FAIL src/jobs-v....tsx (21.676 s):String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError ● localised matching count: en table 0 retains membership and changes language without job reads expect(jest.fn()).toHaveBeenCalledTimes(expected) Expected number of calls: 2 Received number of calls: 3 52 | fireEvent.click(screen.getByRole('button', { name: 'Change language' })); 53 | await screen.findByText(label(language === 'en' ? 'nb' : 'en')); > 54 | expect(mockedApi.get).toHaveBeenCalledTimes(calls); | ^ 55 | expect(ids(view === 'board' ? '[data-kanban-card-id]' : '[data-job-row-id]', view === 'board' ? 'data-kanban-card-id' : 'data-job-row-id')).toEqual(jobs.slice(0, count).map(job => job.id)); 56 | }); 57 | at toHaveBeenCalledTimes (src/jobs-view-integration.test.tsx:54:25) ● localised matching count: en table 1 retains membership and changes language without job reads Unable to find an element with the text: 1 matching job. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style  
   /jobs ?view=table         Table   Board  
  1 matching jobs 

     Search     ​          Search        Status  ); 49 | const label = (locale: 'en' | 'nb') => locale === 'en' ? `${count} matching ${count === 1 ? 'job' : 'jobs'}` : `${count} ${count === 1 ? 'jobb' : 'jobber'} samsvarer`; > 50 | await screen.findByText(label(language)); | ^ 51 | const calls = mockedApi.get.mock.calls.length; 52 | fireEvent.click(screen.getByRole('button', { name: 'Change language' })); 53 | await screen.findByText(label(language === 'en' ? 'nb' : 'en')); at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27) at node_modules/@testing-library/dom/dist/query-helpers.js:86:33 at findByText (src/jobs-view-integration.test.tsx:50:16) ● localised matching count: en table 2 retains membership and changes language without job reads expect(jest.fn()).toHaveBeenCalledTimes(expected) Expected number of calls: 1 Received number of calls: 2 52 | fireEvent.click(screen.getByRole('button', { name: 'Change language' })); 53 | await screen.findByText(label(language === 'en' ? 'nb' : 'en')); > 54 | expect(mockedApi.get).toHaveBeenCalledTimes(calls); | ^ 55 | expect(ids(view === 'board' ? '[data-kanban-card-id]' : '[data-job-row-id]', view === 'board' ? 'data-kanban-card-id' : 'data-job-row-id')).toEqual(jobs.slice(0, count).map(job => job.id)); 56 | }); 57 | at toHaveBeenCalledTimes (src/jobs-view-integration.test.tsx:54:25) ● localised matching count: en board 0 retains membership and changes language without job reads expect(jest.fn()).toHaveBeenCalledTimes(expected) Expected number of calls: 1 Received number of calls: 2 52 | fireEvent.click(screen.getByRole('button', { name: 'Change language' })); 53 | await screen.findByText(label(language === 'en' ? 'nb' : 'en')); > 54 | expect(mockedApi.get).toHaveBeenCalledTimes(calls); | ^ 55 | expect(ids(view === 'board' ? '[data-kanban-card-id]' : '[data-job-row-id]', view === 'board' ? 'data-kanban-card-id' : 'data-job-row-id')).toEqual(jobs.slice(0, count).map(job => job.id)); 56 | }); 57 | at toHaveBeenCalledTimes (src/jobs-view-integration.test.tsx:54:25) ● localised matching count: en board 1 retains membership and changes language without job reads Unable to find an element with the text: 1 matching job. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style  
   /jobs ?view=board         Table   Board  
  1 matching jobs 

     Search     ​          Search        Status  ); 49 | const label = (locale: 'en' | 'nb') => locale === 'en' ? `${count} matching ${count === 1 ? 'job' : 'jobs'}` : `${count} ${count === 1 ? 'jobb' : 'jobber'} samsvarer`; > 50 | await screen.findByText(label(language)); | ^ 51 | const calls = mockedApi.get.mock.calls.length; 52 | fireEvent.click(screen.getByRole('button', { name: 'Change language' })); 53 | await screen.findByText(label(language === 'en' ? 'nb' : 'en')); at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27) at node_modules/@testing-library/dom/dist/query-helpers.js:86:33 at findByText (src/jobs-view-integration.test.tsx:50:16) ● localised matching count: en board 2 retains membership and changes language without job reads expect(jest.fn()).toHaveBeenCalledTimes(expected) Expected number of calls: 1 Received number of calls: 2 52 | fireEvent.click(screen.getByRole('button', { name: 'Change language' })); 53 | await screen.findByText(label(language === 'en' ? 'nb' : 'en')); > 54 | expect(mockedApi.get).toHaveBeenCalledTimes(calls); | ^ 55 | expect(ids(view === 'board' ? '[data-kanban-card-id]' : '[data-job-row-id]', view === 'board' ? 'data-kanban-card-id' : 'data-job-row-id')).toEqual(jobs.slice(0, count).map(job => job.id)); 56 | }); 57 | at toHaveBeenCalledTimes (src/jobs-view-integration.test.tsx:54:25) ● localised matching count: nb table 0 retains membership and changes language without job reads expect(jest.fn()).toHaveBeenCalledTimes(expected) Expected number of calls: 1 Received number of calls: 2 52 | fireEvent.click(screen.getByRole('button', { name: 'Change language' })); 53 | await screen.findByText(label(language === 'en' ? 'nb' : 'en')); > 54 | expect(mockedApi.get).toHaveBeenCalledTimes(calls); | ^ 55 | expect(ids(view === 'board' ? '[data-kanban-card-id]' : '[data-job-row-id]', view === 'board' ? 'data-kanban-card-id' : 'data-job-row-id')).toEqual(jobs.slice(0, count).map(job => job.id)); 56 | }); 57 | at toHaveBeenCalledTimes (src/jobs-view-integration.test.tsx:54:25) ● localised matching count: nb table 1 retains membership and changes language without job reads Unable to find an element with the text: 1 jobb samsvarer. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style  
   /jobs ?view=table         Tabell   Tavle  
  1 jobber samsvarer 

     Søk     ​          Søk        Status  ); 49 | const label = (locale: 'en' | 'nb') => locale === 'en' ? `${count} matching ${count === 1 ? 'job' : 'jobs'}` : `${count} ${count === 1 ? 'jobb' : 'jobber'} samsvarer`; > 50 | await screen.findByText(label(language)); | ^ 51 | const calls = mockedApi.get.mock.calls.length; 52 | fireEvent.click(screen.getByRole('button', { name: 'Change language' })); 53 | await screen.findByText(label(language === 'en' ? 'nb' : 'en')); at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27) at node_modules/@testing-library/dom/dist/query-helpers.js:86:33 at findByText (src/jobs-view-integration.test.tsx:50:16) ● localised matching count: nb table 2 retains membership and changes language without job reads expect(jest.fn()).toHaveBeenCalledTimes(expected) Expected number of calls: 1 Received number of calls: 2 52 | fireEvent.click(screen.getByRole('button', { name: 'Change language' })); 53 | await screen.findByText(label(language === 'en' ? 'nb' : 'en')); > 54 | expect(mockedApi.get).toHaveBeenCalledTimes(calls); | ^ 55 | expect(ids(view === 'board' ? '[data-kanban-card-id]' : '[data-job-row-id]', view === 'board' ? 'data-kanban-card-id' : 'data-job-row-id')).toEqual(jobs.slice(0, count).map(job => job.id)); 56 | }); 57 | at toHaveBeenCalledTimes (src/jobs-view-integration.test.tsx:54:25) ● localised matching count: nb board 0 retains membership and changes language without job reads expect(jest.fn()).toHaveBeenCalledTimes(expected) Expected number of calls: 1 Received number of calls: 2 52 | fireEvent.click(screen.getByRole('button', { name: 'Change language' })); 53 | await screen.findByText(label(language === 'en' ? 'nb' : 'en')); > 54 | expect(mockedApi.get).toHaveBeenCalledTimes(calls); | ^ 55 | expect(ids(view === 'board' ? '[data-kanban-card-id]' : '[data-job-row-id]', view === 'board' ? 'data-kanban-card-id' : 'data-job-row-id')).toEqual(jobs.slice(0, count).map(job => job.id)); 56 | }); 57 | at toHaveBeenCalledTimes (src/jobs-view-integration.test.tsx:54:25) ● localised matching count: nb board 1 retains membership and changes language without job reads Unable to find an element with the text: 1 jobb samsvarer. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style  
   /jobs ?view=board         Tabell   Tavle  
  1 jobber samsvarer 

     Søk     ​          Søk        Status  ); 49 | const label = (locale: 'en' | 'nb') => locale === 'en' ? `${count} matching ${count === 1 ? 'job' : 'jobs'}` : `${count} ${count === 1 ? 'jobb' : 'jobber'} samsvarer`; > 50 | await screen.findByText(label(language)); | ^ 51 | const calls = mockedApi.get.mock.calls.length; 52 | fireEvent.click(screen.getByRole('button', { name: 'Change language' })); 53 | await screen.findByText(label(language === 'en' ? 'nb' : 'en')); at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27) at node_modules/@testing-library/dom/dist/query-helpers.js:86:33 at findByText (src/jobs-view-integration.test.tsx:50:16) ● localised matching count: nb board 2 retains membership and changes language without job reads expect(jest.fn()).toHaveBeenCalledTimes(expected) Expected number of calls: 1 Received number of calls: 2 52 | fireEvent.click(screen.getByRole('button', { name: 'Change language' })); 53 | await screen.findByText(label(language === 'en' ? 'nb' : 'en')); > 54 | expect(mockedApi.get).toHaveBeenCalledTimes(calls); | ^ 55 | expect(ids(view === 'board' ? '[data-kanban-card-id]' : '[data-job-row-id]', view === 'board' ? 'data-kanban-card-id' : 'data-job-row-id')).toEqual(jobs.slice(0, count).map(job => job.id)); 56 | }); 57 | at toHaveBeenCalledTimes (src/jobs-view-integration.test.tsx:54:25) Test Suites: 1 failed, 1 total Tests: 12 failed, 6 skipped, 18 total Snapshots: 0 total Time: 22.791 s Ran all test suites within paths "src/jobs-view-integration.test.tsx".