Skip to content

Commit

Permalink
cleanup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matuskosut committed Feb 20, 2024
1 parent eea1f6a commit 9bd4385
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
47 changes: 29 additions & 18 deletions tests/ProductSlider.test.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import { mount } from "@vue/test-utils";
import ProductSlider from "../pages/.vitepress/components/ProductSlider.vue";
import { expect, test, it, describe } from "vitest";
import { expect, it } from "vitest";

import { vuetify } from '../pages/.vitepress/plugins/vuetify';

describe('ProductSlider', () => {
it('renders empty component', () => {
const wrapper = mount(ProductSlider, {
propsData: {
products: [],
}
});
expect(wrapper.exists()).toBe(true);
});

it('renders the component', () => {
const wrapper = mount(ProductSlider, {
it('renders empty component', () => {
const wrapper = mount(ProductSlider, {
propsData: {
products: [],
}
})

expect(wrapper.exists()).toBe(true)
})

it('renders the component', () => {
const wrapper = mount(
ProductSlider,
{
propsData: {
products: [
{
Expand All @@ -22,10 +27,16 @@ describe('ProductSlider', () => {
img: './product1.png',
href: '#product1',
},
],
]
},
global: {
// components: {
// ProductSlider,
// },
plugins: [vuetify],
}
});
expect(wrapper.exists()).toBe(true);
});
// Add more test cases as needed
});
}
)

expect(wrapper.exists()).toBe(true)
})
7 changes: 0 additions & 7 deletions tests/example.test.ts

This file was deleted.

4 changes: 0 additions & 4 deletions tests/example.ts

This file was deleted.

0 comments on commit 9bd4385

Please sign in to comment.