( filePath: string, searchValue: string, replaceValue: string, hmr = false, )
| 100 | } |
| 101 | |
| 102 | async function modifyFileAndWaitUntilUpdated( |
| 103 | filePath: string, |
| 104 | searchValue: string, |
| 105 | replaceValue: string, |
| 106 | hmr = false, |
| 107 | ): Promise<void> { |
| 108 | await Promise.all([ |
| 109 | waitForAnyProcessOutputToMatch( |
| 110 | hmr ? /Component update sent to client/ : /Page reload sent to client/, |
| 111 | ), |
| 112 | setTimeout(100).then(() => replaceInFile(filePath, searchValue, replaceValue)), |
| 113 | ]); |
| 114 | } |
no test coverage detected