mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
feat: add test
This commit is contained in:
@@ -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' } });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user