@@ -21,7 +21,7 @@ describe('PluggableComponent', () => {
2121 beforeEach ( ( ) => {
2222 jest . resetModules ( ) ;
2323 } ) ;
24- it ( 'renders correctly' , async ( ) => {
24+ test ( 'renders correctly' , async ( ) => {
2525 const handleClickMock = jest . fn ( ) ;
2626 const props = {
2727 title : 'button title' ,
@@ -48,7 +48,7 @@ describe('PluggableComponent', () => {
4848 } ) ;
4949 } ) ;
5050
51- it ( 'loads children component when import is invalid' , async ( ) => {
51+ test ( 'loads children component when import is invalid' , async ( ) => {
5252 render (
5353 < PluggableComponent id = "est-pluggable" as = "invalid import" >
5454 < div data-testid = "plugin" > Plugin Loaded</ div >
@@ -62,7 +62,7 @@ describe('PluggableComponent', () => {
6262 } ) ;
6363 } ) ;
6464
65- it ( 'loads children component when import is empty' , async ( ) => {
65+ test ( 'loads children component when import is empty' , async ( ) => {
6666 render (
6767 < PluggableComponent
6868 id = "test-pluggable"
@@ -79,7 +79,7 @@ describe('PluggableComponent', () => {
7979 } ) ;
8080 } ) ;
8181
82- it ( 'returns null when do not have children and import is invalid' , async ( ) => {
82+ test ( 'returns null when do not have children and import is invalid' , async ( ) => {
8383 render (
8484 < PluggableComponent
8585 id = "test-pluggable"
@@ -92,7 +92,7 @@ describe('PluggableComponent', () => {
9292 } ) ;
9393 } ) ;
9494
95- it ( 'updates component when props change' , async ( ) => {
95+ test ( 'updates component when props change' , async ( ) => {
9696 const { rerender } = render (
9797 < PluggableComponent
9898 id = "test-pluggable"
@@ -118,7 +118,7 @@ describe('PluggableComponent', () => {
118118 } ) ;
119119 } ) ;
120120
121- it ( 'updates component when children change' , async ( ) => {
121+ test ( 'updates component when children change' , async ( ) => {
122122 const { getByText, getByTestId } = render (
123123 < PluggableComponent
124124 id = "test-pluggable"
@@ -136,15 +136,14 @@ describe('PluggableComponent', () => {
136136 const toggleButton = getByText ( 'Toggle Content' ) ;
137137 fireEvent . click ( toggleButton ) ;
138138
139- // Now, after toggling the content, we expect it to be visible inside PluggableComponent
140139 await waitFor ( ( ) => {
141140 const toggleContent = getByTestId ( 'toggle-content' ) ;
142141 expect ( toggleContent ) . toBeInTheDocument ( ) ;
143142 expect ( toggleContent ) . toHaveTextContent ( 'Toggle On' ) ;
144143 } ) ;
145144 } ) ;
146145
147- it ( 'renders loadingComponent while the plugin is loading' , async ( ) => {
146+ test ( 'renders loadingComponent while the plugin is loading' , async ( ) => {
148147 jest . mock ( './utils' , ( ) => ( {
149148 isPluginAvailable : jest . fn ( ) . mockImplementation (
150149 ( ) => new Promise ( ( resolve ) => {
0 commit comments