mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
25 lines
605 B
TypeScript
25 lines
605 B
TypeScript
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();
|
|
});
|
|
});
|