refactor(editor): Rename design-system unit test files and snapshots (no-changelog) (#11539)

This commit is contained in:
Alex Grozav
2024-11-05 14:20:02 +02:00
committed by GitHub
parent 63d454b776
commit 5ca781bf3a
152 changed files with 45 additions and 44 deletions

View File

@@ -0,0 +1,24 @@
import { render } from '@testing-library/vue';
import { mock, mockClear } from 'vitest-mock-extended';
import Sizes from './Sizes.vue';
describe('Sizes', () => {
const mockCssDeclaration = mock<CSSStyleDeclaration>();
window.getComputedStyle = () => mockCssDeclaration;
beforeEach(() => {
mockClear(mockCssDeclaration);
});
it('should render a section with a variable', () => {
mockCssDeclaration.getPropertyValue.mockReturnValue('400');
const wrapper = render(Sizes, {
props: {
variables: ['--font-weight-regular'],
},
});
expect(wrapper.html()).toMatchSnapshot();
});
});