Получаю ошибку< /p>
Код: Выделить всё
'''console.warn
[Vue warn]: Component is missing template or render function.
at
at '''
Код: Выделить всё
hello.vue
{{ msg }}
...
export default {
props: {
msg: {
type: String,
required: true
}
}
}
hello.spec.js
import HelloWorld from "../../src/hello.vue";
import { mount } from "@vue/test-utils";
describe("HelloWorld", () => {
it("renders properly", () => {
const wrapper = mount(HelloWorld, { props: { msg: "Hello Jest" } });
expect(wrapper.text()).toContain("Hello Jest");
});
})
Прикрепляем скриншот для удобства

Подробнее здесь: https://stackoverflow.com/questions/793 ... or-unit-te
Мобильная версия