This commit is contained in:
2018-08-14 11:38:41 +08:00
commit 97c5760d49
20 changed files with 16105 additions and 0 deletions

8
tests/unit/.eslintrc.js Normal file
View File

@@ -0,0 +1,8 @@
module.exports = {
env: {
jest: true
},
rules: {
'import/no-extraneous-dependencies': 'off'
}
}

View File

@@ -0,0 +1,12 @@
import { shallowMount } from "@vue/test-utils";
import HelloWorld from "@/components/HelloWorld.vue";
describe("HelloWorld.vue", () => {
it("renders props.msg when passed", () => {
const msg = "new message";
const wrapper = shallowMount(HelloWorld, {
propsData: { msg }
});
expect(wrapper.text()).toMatch(msg);
});
});