File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/steps/ValidationStep/tests Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ const getFilterSwitch = () =>
2626
2727const file = new File ( [ "" ] , "file.csv" )
2828
29+ jest . useFakeTimers ( )
30+
2931describe ( "Validation step tests" , ( ) => {
3032 test ( "Submit data" , async ( ) => {
3133 const onSubmit = jest . fn ( )
@@ -664,7 +666,7 @@ describe("Validation step tests", () => {
664666 const LASTNAME = "Doe"
665667 const NEW_NAME = "Johnny"
666668 const NEW_LASTNAME = "CENA"
667- const TIMEOUT = 200
669+ const TIMEOUT = 1000
668670
669671 const fields = [
670672 {
@@ -742,6 +744,9 @@ describe("Validation step tests", () => {
742744 } ) ,
743745 ) . toBeInTheDocument ( ) ,
744746 )
747+
748+ jest . runAllTimers ( )
749+
745750 // check that the value is updated after the hook runs
746751 await waitFor ( ( ) =>
747752 expect (
@@ -762,7 +767,7 @@ describe("Validation step tests", () => {
762767 const LASTNAME = "Doe"
763768 const NEW_NAME = "Johnny"
764769 const NEW_LASTNAME = "CENA"
765- const TIMEOUT = 200
770+ const TIMEOUT = 1000
766771
767772 const fields = [
768773 {
@@ -839,6 +844,8 @@ describe("Validation step tests", () => {
839844 } ) ,
840845 ) . toBeInTheDocument ( ) ,
841846 )
847+
848+ jest . runAllTimers ( )
842849 // check that the value is updated after the hook runs
843850 await waitFor ( ( ) =>
844851 expect (
You can’t perform that action at this time.
0 commit comments