mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
14 lines
448 B
JavaScript
14 lines
448 B
JavaScript
import Vue from 'vue';
|
|
import { shallowMount } from '@vue/test-utils';
|
|
import { expect } from 'chai';
|
|
import Counter from '../src/components/Counter.vue';
|
|
|
|
describe('Counter.vue', () => {
|
|
it('increments count when button is clicked', async () => {
|
|
const wrapper = shallowMount(Counter);
|
|
wrapper.find('button').trigger('click');
|
|
await Vue.nextTick();
|
|
expect(wrapper.find('div').text()).contains('1');
|
|
});
|
|
});
|