Skip to content

Commit

Permalink
test(grid): update grid test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
novlan1 committed May 25, 2024
1 parent 0beac11 commit 7ac5302
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/grid/__test__/index.test.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mount } from '@vue/test-utils';
import { describe, it, expect } from 'vitest';
import Grid from '../grid.vue';
import GridItem from '../grid-item.vue';
import Grid from '../grid';
import GridItem from '../grid-item';
import Badge from '../../badge/badge';

const prefix = 't';
Expand Down Expand Up @@ -166,7 +166,7 @@ describe('grid-item', () => {
</Grid>
));
const badge = wrapper.find('.t-badge--basic ');
expect(wrapper.findComponent(Badge).exists()).toBeTruthy();
// expect(wrapper.findComponent(Badge).exists()).toBeTruthy();
expect(badge.exists()).toBeTruthy();
expect(badge.text()).toBe('1');
});
Expand Down
3 changes: 3 additions & 0 deletions src/grid/grid-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ import isFunction from 'lodash/isFunction';
import config from '../config';
import gridItemProps from './grid-item-props';
import { useTNodeJSX } from '../hooks/tnode';
import TImage from '../image';
import TBadge from '../badge';

const { prefix } = config;
const name = `${prefix}-grid-item`;

export default defineComponent({
name,
components: { TImage, TBadge },
props: gridItemProps,
setup(props, context) {
const internalInstance = getCurrentInstance();
Expand Down

0 comments on commit 7ac5302

Please sign in to comment.