( filePath: string, searchValue: string, replaceValue: string, hmr = false, )
| 92 | } |
| 93 | |
| 94 | async function modifyFileAndWaitUntilUpdated( |
| 95 | filePath: string, |
| 96 | searchValue: string, |
| 97 | replaceValue: string, |
| 98 | hmr = false, |
| 99 | ): Promise<void> { |
| 100 | await Promise.all([ |
| 101 | waitForAnyProcessOutputToMatch( |
| 102 | hmr ? /Component update sent to client/ : /Page reload sent to client/, |
| 103 | ), |
| 104 | setTimeout(100).then(() => replaceInFile(filePath, searchValue, replaceValue)), |
| 105 | ]); |
| 106 | } |
no test coverage detected