Jest App Spec is failing on foss
Job #1176493915 failed for gitlab-foss@536d72ba:
FOSS_ONLY=1 yarn run jest spec/frontend/diffs/components/app_spec.js
● diffs/components/app › fetch diff methods › calls batch methods if diffsBatchLoad is enabled, and not latest version
Unexpected call of console.error() with:
[Vue warn]: Error in mounted hook: "Error: Unexpected call of console.error() with:
[vuex] unknown local action type: setCodequalityEndpoint, global type: diffs/setCodequalityEndpoint"
found in
---> <DiffsApp>
<Root>
at warn (node_modules/vue/dist/vue.runtime.common.dev.js:621:15)
at logError (node_modules/vue/dist/vue.runtime.common.dev.js:1880:5)
at globalHandleError (node_modules/vue/dist/vue.runtime.common.dev.js:1875:3)
at handleError (node_modules/vue/dist/vue.runtime.common.dev.js:1835:5)
at invokeWithErrorHandling (node_modules/vue/dist/vue.runtime.common.dev.js:1858:5)
at callHook (node_modules/vue/dist/vue.runtime.common.dev.js:4207:7)
at Object.insert (node_modules/vue/dist/vue.runtime.common.dev.js:3133:7)
at invokeInsertHook (node_modules/vue/dist/vue.runtime.common.dev.js:6326:28)
at VueComponent.patch [as __patch__] (node_modules/vue/dist/vue.runtime.common.dev.js:6543:5)
at VueComponent.Vue._update (node_modules/vue/dist/vue.runtime.common.dev.js:3933:19)
at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.dev.js:4054:10)
at Watcher.get (node_modules/vue/dist/vue.runtime.common.dev.js:4465:25)
at new Watcher (node_modules/vue/dist/vue.runtime.common.dev.js:4454:12)
at mountComponent (node_modules/vue/dist/vue.runtime.common.dev.js:4061:3)
at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.dev.js:8392:10)
at mount (node_modules/@vue/test-utils/dist/vue-test-utils.js:13991:21)
● diffs/components/app › fetch diff methods › calls batch methods if diffsBatchLoad is enabled, and not latest version
TypeError: Cannot read property 'vm' of undefined
115 |
116 | it('calls batch methods if diffsBatchLoad is enabled, and not latest version', async () => {
> 117 | expect(wrapper.vm.diffFilesLength).toEqual(0);
| ^
118 | wrapper.vm.fetchData(false);
119 |
120 | await nextTick();
at Object.<anonymous> (spec/frontend/diffs/components/app_spec.js:117:22)
● diffs/components/app › fetch diff methods › calls batch methods if diffsBatchLoad is enabled, and not latest version
expect.hasAssertions()
Expected at least one assertion to be called but received none.
92 | // see https://jestjs.io/docs/en/expect#expecthasassertions
93 | beforeEach(() => {
> 94 | expect.hasAssertions();
| ^
95 | });
96 |
at Object.<anonymous> (spec/frontend/test_setup.js:94:10)