feat: add frontend
This commit is contained in:
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