import { mount } from '@vue/test-utils'; import ConfigProvider from '..'; import Button from '../../button'; import mountTest from '../../../tests/shared/mountTest'; describe('ConfigProvider', () => { mountTest({ render() { return (
); }, }); it('Content Security Policy', () => { const csp = { nonce: 'test-antd' }; const wrapper = mount({ render() { return ( ); }, }); expect(wrapper.find({ name: 'AButton' }).text()).toBe('确定'); }); });