@@ -17,27 +17,27 @@ describe('<Alert /> component', () => {
1717 useAlert ( { theme : 'danger' , isDisabled : true } ) ,
1818 ) ;
1919
20- expect ( result . current . theme ) . toBe ( 'disabled' ) ;
20+ expect ( result . current . mods . type ) . toBe ( 'disabled' ) ;
2121 } ) ;
2222
2323 it ( 'should correctly render theme' , ( ) => {
2424 const { result } = renderHook ( ( ) => useAlert ( { theme : 'danger' } ) ) ;
2525
26- expect ( result . current . theme ) . toBe ( 'danger' ) ;
26+ expect ( result . current . mods . type ) . toBe ( 'danger' ) ;
2727 } ) ;
2828
2929 it ( 'should correctly render type' , ( ) => {
3030 const { result } = renderHook ( ( ) => useAlert ( { type : 'danger' } ) ) ;
3131
32- expect ( result . current . theme ) . toBe ( 'danger' ) ;
32+ expect ( result . current . mods . type ) . toBe ( 'danger' ) ;
3333 } ) ;
3434
3535 it ( 'should correctly render theme' , ( ) => {
3636 const { result } = renderHook ( ( ) =>
3737 useAlert ( { theme : 'danger' , type : 'note' } ) ,
3838 ) ;
3939
40- expect ( result . current . theme ) . toBe ( 'danger' ) ;
40+ expect ( result . current . mods . type ) . toBe ( 'danger' ) ;
4141 } ) ;
4242
4343 it ( 'should add qa' , ( ) => {
@@ -47,4 +47,26 @@ describe('<Alert /> component', () => {
4747
4848 expect ( result . current . filteredProps . qa ) . toBe ( 'test' ) ;
4949 } ) ;
50+
51+ it ( 'should default to card shape' , ( ) => {
52+ const { result } = renderHook ( ( ) => useAlert ( { theme : 'danger' } ) ) ;
53+
54+ expect ( result . current . mods . shape ) . toBe ( 'card' ) ;
55+ } ) ;
56+
57+ it ( 'should correctly render sharp shape' , ( ) => {
58+ const { result } = renderHook ( ( ) =>
59+ useAlert ( { theme : 'danger' , shape : 'sharp' } ) ,
60+ ) ;
61+
62+ expect ( result . current . mods . shape ) . toBe ( 'sharp' ) ;
63+ } ) ;
64+
65+ it ( 'should correctly render card shape' , ( ) => {
66+ const { result } = renderHook ( ( ) =>
67+ useAlert ( { theme : 'success' , shape : 'card' } ) ,
68+ ) ;
69+
70+ expect ( result . current . mods . shape ) . toBe ( 'card' ) ;
71+ } ) ;
5072} ) ;
0 commit comments