-
Notifications
You must be signed in to change notification settings - Fork 153
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
test: add e2e test to ensure we ship with non audio/video codecs #2604
Conversation
afterEach(async () => await appController.stop()); | ||
|
||
// https://html.spec.whatwg.org/multipage/media.html#error-codes:dom-mediaerror-media_err_src_not_supported | ||
it('has error when loading mp3 <audio> in renderer process', async () => { |
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 really like the design of this test case; this is much cleaner than verifying file hashes like I how I'd imagined this test working initially.
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.
This looks great overall, I really like the strategy the test is using. Only 1 minor comment, approving pending comment
Description of changes
We ship with a slimmer mirrored version of electron to avoid shipping the non-freely-distributable ffmpeg codecs in the base build. This PR adds an e2e test to ensure node_modules/electron/dist has minimal audio/video capabilities, since we don't need them.
Build without mirror - test fails
Build with mirror - test passes
This test only runs in the release pipeline. The mp3 file is very short white noise.
Pull request checklist
yarn fastpass
yarn test
)<rootDir>/test-results/unit/coverage
fix:
,chore:
,feat(feature-name):
,refactor:
). SeeCONTRIBUTING.md
.