-
Notifications
You must be signed in to change notification settings - Fork 40
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
Basic HTML property testing for WebAssembly #425
Conversation
Import https://gist.github.com/jelmervdl/a4c8b6b92ad88a885e1cbd51c6ad4902 and attach it to CI. NodeJS-14 is failing on trying to use the WebAssembly binary. So we use node-16 independently setup. This paves way for more complicated testing for WebAssembly bindings in the future.
wasm/node-test.js
Outdated
const output = service.translate(model, input, options); | ||
|
||
// Get output from std::vector<Response> | ||
console.log(output.get(0).getTranslatedText()); |
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.
Should it check the output to be "Hallo Welt!", to detect whether it is producing rubbish or not?
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'm more in favour of property based testing. Input valid non-empty HTML, did I get valid non-empty HTML translation out, that sort. I expect such stuff to grow if we start exposing a JS library as mentioned in #330. Adding ASSERT_EQUALS will give us pain if compiler etc changes, which often happened in BRT.
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.
LGTM
Imports
https://gist.github.com/jelmervdl/a4c8b6b92ad88a885e1cbd51c6ad4902 and
attach it to CI. NodeJS-14 is failing on trying to use the WebAssembly
binary. So we use node-16 independently setup. This paves way for more
complicated testing for WebAssembly bindings in the future. It should be possible
to remove minimal builds in favour of closer to WebAssembly tests following this
change.
mozilla/firefox-translations#353 phases out wormhole.
This change removes the
.js
and.wasm
with wormhole from the GitHubrelease done. (This does not edit Mozilla's CircleCI or files, nor attempt to
remove WORMHOLE completely).
This also includes a fix for a
.js
and.wasm
release broken in #424.GitHub CI code verified to work as intended at at fork
(https://github.com/jerinphilip/bergamot-translator).
Related to: #421, #330