+ Using props and events:
+
+ {{ value }}
+
+ Using the `v-model` directive:
+
+ {{ value2 }}
+
+
+
diff --git a/packages/_vue3-migration-test/src/router.ts b/packages/_vue3-migration-test/src/router.ts
index c188737156..d08a611bd9 100644
--- a/packages/_vue3-migration-test/src/router.ts
+++ b/packages/_vue3-migration-test/src/router.ts
@@ -49,7 +49,8 @@ import {
TestRenderlessExtraParam,
TestAnimationFactory,
TestIcons,
- TestDisplayEmitter
+ TestDisplayEmitter,
+ TestBaseSwitch
} from './';
const routes = [
@@ -302,6 +303,11 @@ const routes = [
path: '/display-emitter',
name: 'DisplayEmitter',
component: TestDisplayEmitter
+ },
+ {
+ path: '/base-switch',
+ name: 'BaseSwitch',
+ component: TestBaseSwitch
}
];
diff --git a/packages/x-components/src/components/__tests__/base-switch.spec.ts b/packages/x-components/src/components/__tests__/base-switch.spec.ts
index 99369a9465..b0037b71a9 100644
--- a/packages/x-components/src/components/__tests__/base-switch.spec.ts
+++ b/packages/x-components/src/components/__tests__/base-switch.spec.ts
@@ -1,4 +1,4 @@
-import { mount, Wrapper } from '@vue/test-utils';
+import { mount, VueWrapper } from '@vue/test-utils';
import BaseSwitch from '../base-switch.vue';
function renderBaseSwitch({ template, value }: RenderBaseSwitchOptions): RenderBaseSwitchApi {
@@ -27,7 +27,7 @@ describe('testing Switch component', () => {
});
expect(wrapper.attributes('role')).toBe('switch');
- expect(wrapper.attributes('aria-checked')).toBe('false');
+ expect(wrapper.attributes('aria-checked')).toBeFalsy();
expect(wrapper.classes('x-switch--is-selected')).toBe(false);
expect(wrapper.classes('x-selected')).toBe(false);
@@ -43,7 +43,7 @@ describe('testing Switch component', () => {
value: false
});
expect(wrapper.attributes('role')).toBe('switch');
- expect(wrapper.attributes('aria-checked')).toBe('false');
+ expect(wrapper.attributes('aria-checked')).toBeFalsy();
expect(wrapper.classes('x-switch--is-selected')).toBe(false);
expect(wrapper.classes('x-selected')).toBe(false);
@@ -69,5 +69,5 @@ interface RenderBaseSwitchApi {
/**
* The wrapper testing component instance.
*/
- wrapper: Wrapper