feat: add frontend
This commit is contained in:
13
frontend/test/Header.spec.js
Normal file
13
frontend/test/Header.spec.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import Header from '@/components/Header.vue'
|
||||
|
||||
describe('Header', () => {
|
||||
test('is a Vue instance', () => {
|
||||
const wrapper = mount(Header, {
|
||||
stubs: {
|
||||
NuxtLink: true,
|
||||
},
|
||||
});
|
||||
expect(wrapper.vm).toBeTruthy()
|
||||
})
|
||||
})
|
13
frontend/test/Home.spec.js
Normal file
13
frontend/test/Home.spec.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import Home from '@/components/Home.vue'
|
||||
|
||||
describe('Home', () => {
|
||||
test('is a Vue instance', () => {
|
||||
const wrapper = mount(Home, {
|
||||
stubs: {
|
||||
NuxtLink: true,
|
||||
},
|
||||
});
|
||||
expect(wrapper.vm).toBeTruthy()
|
||||
})
|
||||
})
|
9
frontend/test/Legend.spec.js
Normal file
9
frontend/test/Legend.spec.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import Legend from '@/components/Legend.vue'
|
||||
|
||||
describe('Legend', () => {
|
||||
test('is a Vue instance', () => {
|
||||
const wrapper = mount(Legend);
|
||||
expect(wrapper.vm).toBeTruthy()
|
||||
})
|
||||
})
|
9
frontend/test/Loader.spec.js
Normal file
9
frontend/test/Loader.spec.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import Loader from '@/components/Loader.vue'
|
||||
|
||||
describe('Loader', () => {
|
||||
test('is a Vue instance', () => {
|
||||
const wrapper = mount(Loader);
|
||||
expect(wrapper.vm).toBeTruthy()
|
||||
})
|
||||
})
|
21
frontend/test/Rating.spec.js
Normal file
21
frontend/test/Rating.spec.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import Rating from '@/components/Rating.vue'
|
||||
|
||||
describe('Rating', () => {
|
||||
test('is a Vue instance', () => {
|
||||
const wrapper = mount(Rating, {
|
||||
props: {
|
||||
color: "#001122"
|
||||
}
|
||||
});
|
||||
expect(wrapper.vm).toBeTruthy();
|
||||
});
|
||||
test('contains no color', () => {
|
||||
const wrapper = mount(Rating, {
|
||||
props: {
|
||||
color: "#001122"
|
||||
}
|
||||
});
|
||||
expect(wrapper.find(".rating span").find("span").classes()).empty();
|
||||
});
|
||||
})
|
Reference in New Issue
Block a user