@maxpike/vue
Version:
Vue VariantJS: Fully configurable Vue 3 components styled with TailwindCSS
25 lines (21 loc) • 608 B
text/typescript
import useVModel from '../../use/useVModel';
import { useSetup } from './useSetup';
describe('useVModel', () => {
const defaultValue = 'default';
it('should work with default value', () => {
useSetup(() => {
const data = useVModel({
modelValue: defaultValue,
}, 'modelValue');
expect(data.value).toBe(defaultValue);
});
});
it('should work with a different value from the default', () => {
useSetup(() => {
const data = useVModel({
otherValue: defaultValue,
}, 'otherValue');
expect(data.value).toBe(defaultValue);
});
});
});