-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fix broken browser tests #269
Conversation
juslesan
commented
Nov 2, 2021
- Replace Jest functions that do not work in the browser tests
Would it be possible to modify the browser test setup so that it supports Currently we set the standard jest object to global namespace in
We also set some additional methods there, e.g.:
Maybe the |
I've tried to add the |
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.
👍
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.
Yes, good to get the tests green. Let's integrate jest-extended
in another PR (or add the similar helper methods manually).
* main: (48 commits) style(client): fix eslint error Fix broken browser tests (#269) client [NET-571]: Using the Brubeck client without providing a private key (#268) ci: specify exact action versions for easy debugability (#266) ci(deps): bump actions/checkout from 2.3.5 to 2.4.0 (#271) docs(broker): fix mqtt example fix(broker): rely on default value for config.network.webrtcDisallowPrivateAddresses fix(broker): fix default value type in schema release: cli-tools 6.0.0-alpha.0 fix: cli-tools work with alpha client test(network): fix describe Update README.md style(broker): break up log line ci(test-utils): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(protocol): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(network): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(client-dataunions): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(client-code): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(client-build): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(broker): replace styfle/cancel-workflow-action with GitHub Actions concurrency ...
* NET-542-brubeck-client-browser: (50 commits) Revert "Revert "Merge branch 'main' into NET-542-brubeck-client-browser"" Revert "Revert "Merge branch 'main' into NET-542-brubeck-client-browser"" style(client): fix eslint error Fix broken browser tests (#269) client [NET-571]: Using the Brubeck client without providing a private key (#268) ci: specify exact action versions for easy debugability (#266) ci(deps): bump actions/checkout from 2.3.5 to 2.4.0 (#271) docs(broker): fix mqtt example fix(broker): rely on default value for config.network.webrtcDisallowPrivateAddresses fix(broker): fix default value type in schema release: cli-tools 6.0.0-alpha.0 fix: cli-tools work with alpha client test(network): fix describe Update README.md style(broker): break up log line ci(test-utils): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(protocol): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(network): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(client-dataunions): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(client-code): replace styfle/cancel-workflow-action with GitHub Actions concurrency ...
…rge_main * origin/main: (34 commits) broker [NET-573]: MQTT plugin improvements (#272) style(client): fix eslint error Fix broken browser tests (#269) client [NET-571]: Using the Brubeck client without providing a private key (#268) ci: specify exact action versions for easy debugability (#266) ci(deps): bump actions/checkout from 2.3.5 to 2.4.0 (#271) docs(broker): fix mqtt example fix(broker): rely on default value for config.network.webrtcDisallowPrivateAddresses fix(broker): fix default value type in schema release: cli-tools 6.0.0-alpha.0 fix: cli-tools work with alpha client test(network): fix describe Update README.md style(broker): break up log line ci(test-utils): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(protocol): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(network): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(client-dataunions): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(client-code): replace styfle/cancel-workflow-action with GitHub Actions concurrency ci(client-build): replace styfle/cancel-workflow-action with GitHub Actions concurrency ... # Conflicts: # packages/broker/src/broker.ts # packages/cli-tools/src/publish.ts
Added support for jest-extended methods (e.g thetoIncludeSameMembers() matcher) in browser tests. The injection in karma-setup.js is a bit hack as we need to import an internal file from jest-extended library: import jestExtendedMatchers from 'jest-extended/dist/matchers' This PR also brings back the use of jest-extended in two network test cases (reverts most of PR #269).