feat: add frontend

This commit is contained in:
2022-10-07 16:15:53 +02:00
parent abfaf19c47
commit 97059d4c6e
72 changed files with 47026 additions and 0 deletions

View 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()
})
})

View 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()
})
})

View 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()
})
})

View 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()
})
})

View 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();
});
})