Automating Callbacks to Async/Await Migrations for Mocha Tests: Part 2

1 · Marco Labarile · Oct. 18, 2023, 10 p.m.
In the previous article we showed how to automate the migration from callbacks to async/await for Mocha tests using jscodeshift. We started from the jscodeshift-ts-template repo and added the final implementation to the ts-codemods repo. We know by now that not all code can be automatically migrated. So is there anything else we can do? If you happen to use some known test libraries or frameworks that come with their code structure, you can migrate them too with jscodeshift in most cases. In thi...