New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests: New .testhtml
format to replace .js
language tests
#2932
Conversation
What makes these special and requiring a different format than the traditional Or: Why were the JS tests different in the first place? |
Two reasons:
Basically, |
Thanks for the clarification. I was curious about this because I've never loved how we do our markup testing... though the idea of just merging the input and output files has long been an idea I've had (ie, what you're doing with testhtml). Currently we have them as entirely separate files in our repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a step in a good direction! This is exactly a problem I was thinking about and glad that we're on the same page about the confidence in the system -- however, with my limited context it seems like we're re-inventing a wheel for a solved problem...
I wrote a full response here: JaKXz#1 (comment)
Closed in favor of #3148. |
I added a new test file format that replaces the
.js
language tests (all 5 of them).Motivation
.js
language tests are inconvenient because commands likenpm run test:languages -- --update
don't affect them. They also require more escaping because code is stored in JS strings.A new test suite came up here. Inspired by this, I came up with
.testhtml
..testhtml
files are very similar to our current.test
files. The only difference is that they store the HTML output instead of the simplified JSON stream. This allows.testhtml
files to test the same code as current.js
files while being as convenient as.test
files.Changes
.testhtml
format (implementation + doc),.js
test files can converted all current.js
test files into.testhtml
files./cc @JaKXz