Transient failure `diffs/components/commit_item` in `jest-as-if-foss`: `find did not return pre.commit-row-description, cannot call text() on empty Wrapper and `Expected at least one assertion to be called but received none.`
Job #464427439 failed for c567376b:
730 Summary of all failing tests
731 FAIL spec/frontend/diffs/components/commit_item_spec.js
732 ● diffs/components/commit_item › default state › renders commit description
733 [vue-test-utils]: find did not return pre.commit-row-description, cannot call text() on empty Wrapper
734 66 | const expected = commit.description_html.replace(/
/g, '');
735 67 |
736 > 68 | expect(trimText(descElement.text())).toEqual(trimText(expected));
737 | ^
738 69 | expect(descExpandElement.exists()).toBe(true);
739 70 | });
740 71 |
741 at throwError (node_modules/@vue/test-utils/dist/vue-test-utils.js:1462:9)
742 at ErrorWrapper.text (node_modules/@vue/test-utils/dist/vue-test-utils.js:8481:3)
743 at Object.text (spec/frontend/diffs/components/commit_item_spec.js:68:35)
744 ● diffs/components/commit_item › default state › renders commit description
745 expect.hasAssertions()
746 Expected at least one assertion to be called but received none.
747 97 | // see https://jestjs.io/docs/en/expect#expecthasassertions
748 98 | beforeEach(() => {
749 > 99 | expect.hasAssertions();
750 | ^
751 100 | });
752 101 |
753 at Object.hasAssertions (spec/frontend/test_setup.js:99:10)
754 Test Suites: 1 failed, 1 skipped, 589 passed, 590 of 591 total
755 Tests: 1 failed, 51 skipped, 6058 passed, 6110 total
756 Snapshots: 87 passed, 87 total
757 Time: 567.116s
Edited by Rémy Coutable