Skip to content

Conversation

@mansona
Copy link
Member

@mansona mansona commented Aug 19, 2022

Because v6 of execa is ESM only we need to update our scripts that are using it to also be ESM. This PR does that 👍

}

console.log('codemod ran successfully! 🎉');
process.exit(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this test have actual assertions? Or is it like a smoke test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so... unfortunatly the git diff didn't quite fiture out that this was a move-file change. I didn't alter the way the test was working, I'm just changing it to .mjs to make it work with the new execa version.

but from my understanding, this does have an "assertion". If you look at the bit that is calling diff on two folders: https://github.com/ember-codemods/ember-angle-brackets-codemod/pull/502/files#diff-f28f8437ce5be5f9a77df8786489b7522a29c3377687b4feb491253b7044a4e2R21 you'll see that it's testing the "app" folder against a known output folder. That comes from the fixtures folder: https://github.com/ember-codemods/ember-angle-brackets-codemod/tree/master/test/fixtures

essentially I've seen people setup codemod tests like this before and it's just testing an input folder against an expected output at the end, and if they match it's good 🎉

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope that answers your question 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants