feat: add test

This commit is contained in:
crazyair
2026-02-06 17:16:27 +08:00
parent ee1675ead9
commit 97e5011f2c

View File

@@ -1,11 +1,12 @@
import { renderHook } from '@testing-library/react';
import { mergeClassNames, useMergeSemantic } from '../hooks';
import { mergeClassNames } from '../hooks';
import { useMergeSemantic } from '../hooks/useMergeSemanticNew';
const mockSchema = {
_default: 'root',
// _default: 'root',
container: {
_default: 'container-root',
// _default: 'container-root',
header: {
_default: 'header-root',
},
@@ -67,6 +68,6 @@ describe('useMergeSemantic', () => {
const [classNames, styles] = result.current;
expect(classNames.container.header).toHaveProperty('header-root', 'foo');
expect(styles.container.header).toEqual({ color: 'red' });
expect(styles.container.header).toEqual({ 'header-root': { color: 'red' } });
});
});