A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuejs/vue-test-utils/issues/1845 below:

Bug introduced from 1.1.4 and later · Issue #1845 · vuejs/vue-test-utils · GitHub

Subject of the issue

My unit tests suddenly started breaking from 1.1.4 and later

Steps to reproduce

since updating to 1.1.4 (or greater) my unit tests are now breaking - I have a custom component (renderer) which renders form components (e.g. input, text area, checkbox etc) dynamically using a config provided via props. The component iterates through the config and renders the inputs (mapping them to appropriate vue components) - now in my test when i do the following:

...
const dynamicFormConfig = ['text-area', 'text-input'];

const options = merge({
    propsData: {
      dynamicFormConfig,
    },
    store,
    localVue,
  }, params.options);

textInput = mount(RendererComponent, options).findComponent({` name: 'MyTextInput' });

expect(textInput.exists()).toBe(true); 

i should get true, but now my tests fail with false.

Expected behaviour

I should get true from the test expectation but now im getting false. When i downgrade to 1.1.3 everything works fine and the tests pass.

Actual behaviour

The test now fails. (i.e. textInput.exist() returns false)

Possible Solution

Revert the breaking change introduced in 1.1.4 (Djaler:fix/find-functional-component)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4