File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/attribute-editor/__tests__ Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
77
88import AttributeEditor from '../../../lib/components/attribute-editor' ;
99
10+ jest . mock ( '@cloudscape-design/component-toolkit' , ( ) => ( {
11+ ...jest . requireActual ( '@cloudscape-design/component-toolkit' ) ,
12+ useContainerQuery : jest . fn ( ) . mockImplementation ( ( ) => [ 'm' , ( ) => { } ] ) ,
13+ } ) ) ;
14+
1015jest . mock ( '@cloudscape-design/component-toolkit/internal' , ( ) => ( {
1116 ...jest . requireActual ( '@cloudscape-design/component-toolkit/internal' ) ,
1217 warnOnce : jest . fn ( ) ,
@@ -39,6 +44,7 @@ describe('AttributeEditor component', () => {
3944 />
4045 ) ;
4146
47+ expect ( warnOnce ) . toHaveBeenCalledTimes ( 1 ) ;
4248 expect ( warnOnce ) . toHaveBeenCalledWith (
4349 'AttributeEditor' ,
4450 'A `label` should be provided for each field definition. It is used as `aria-label` for accessibility.'
You can’t perform that action at this time.
0 commit comments