mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(editor): Rename design-system unit test files and snapshots (no-changelog) (#11539)
This commit is contained in:
24
packages/design-system/src/styleguide/Sizes.test.ts
Normal file
24
packages/design-system/src/styleguide/Sizes.test.ts
Normal 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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user