Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings In Tests When Using createLocalVue() From vue-test-utils #530

Closed
ccaspers opened this issue Sep 17, 2020 · 0 comments · Fixed by #531
Closed

Warnings In Tests When Using createLocalVue() From vue-test-utils #530

ccaspers opened this issue Sep 17, 2020 · 0 comments · Fixed by #531

Comments

@ccaspers
Copy link

When using any of the 1.0.0 betas, a lot of warnings get printed during tests. This is caused by code like this:

import VueCompositionAPI from "@vue/composition-api";
import { createLocalVue } from "@vue/test-utils";
import range from "lodash/range";
import { VueConstructor } from "vue";

describe("warnings", () => {
  let localVue: VueConstructor;

  beforeEach(() => {
    localVue = createLocalVue();
    localVue.use(VueCompositionAPI);
  });

  test.each(range(5))("create localVue 5 times", () => {
    expect(localVue).toBeDefined();
  });
});

The printed warning will look like this:

 [Vue warn]: Another instance of vue installed

Is there anything that could be done to silence those warnings? The issue seems to be related to #492

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant