-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Set up testing #4465
Comments
AVAJS is an alternative to mocha. I really like how it is kept simple and allows for concurrent test files to run. Tests shouldn't take forever to run, this helps speed them up even if you have tons of files. |
I would love to use Ava but the problem with it is that browser testing is unsupported. Normally I'd be cool with using JSDom but given that we're building user interface components in a vanilla manner, I feel like we really should test in all of the browsers we support. I'm subscribed to avajs/ava#24 but it's marked as low priority. |
Ah yea, if we start testing across multiple browsers specifically AVA won't work right now. Which, I'm a big fan of testing across platforms. I haven't personally used any tooling for that, so no immediate recommendations come to mind for it. |
Testing OptionsKarma + Mocha + IspartaIn the wild
Pros
Cons
Karma + Tape + IspartaIn the wild
Pros
Cons
Ava + JSDom + NYCIn the wild
Pros
Cons
|
In terms of cross-browser testing for CI, here's a solid comparison of Browserstack vs. SauceLabs vs. Rainforest QA Browserstack has the highest google trends but SauceLabs looks like it's the favorite. Headless chrome looks awesome but also looks like there still work to be done before it's stable |
Yah, AVA is out right away due to no browser support. We need something that is cross-browser. I also think that with our new direction, we shouldn't worry as much whether the tests run super-fast or take some time. As long as they are accurate and we build wide coverage, that is the important thing. I believe we'd be better off with option 2 since it doesn't have shared global state. It is fairly critical that one test can't cause an accidental collision in another. |
We also need to think about how Closure compiler to check the comments is going to run into our testing. Should we continue with Closure comments? That is another thing to consider. |
@Garbee I agree I'm partial to option 2 as well since tape is leaner and seems to require a lot less config song and dance. re: Closure I spoke with the Angular team and apparently they're working on having Tsickle be able to create externs files from |
Option 2 SGTM, as it gives us a modern architecture that we can easily integrate with CIs, and use for both headless and cross-browser testing. Using externs means our code wouldn't be compiled by Closure, but would at least have an interface to Closurized code. I'm OK with that, as out main goal for Closure support is to make sure that Closure code can use MDL, and it sounds like |
* `npm test` lints files, runs karma, reports coverages, checks coverage thresholds * `npm run test:watch` runs karma in auto-watch mode, with source maps for both source and test files. * [karma](https://karma-runner.github.io/1.0/index.html) is used for running tests. * [tape](https://github.com/substack/tape) is used as the actual test runner. * [bel](https://github.com/shama/bel) is used for easy DOM fixtures. * [testdouble](https://github.com/testdouble/testdouble.js) is used for mocking/doubles. * [isparta](https://github.com/douglasduteil/isparta) is used to instrument source files for coverage. * [istanbul](https://github.com/gotwarlost/istanbul) is used to check and report coverage. resolves #4465
* `npm test` lints files, runs karma, reports coverages, checks coverage thresholds * `npm run test:watch` runs karma in auto-watch mode, with source maps for both source and test files. * [karma](https://karma-runner.github.io/1.0/index.html) is used for running tests. * [tape](https://github.com/substack/tape) is used as the actual test runner. * [bel](https://github.com/shama/bel) is used for easy DOM fixtures. * [testdouble](https://github.com/testdouble/testdouble.js) is used for mocking/doubles. * [isparta](https://github.com/douglasduteil/isparta) is used to instrument source files for coverage. * [istanbul](https://github.com/gotwarlost/istanbul) is used to check and report coverage. resolves #4465
* `npm test` lints files, runs karma, reports coverages, checks coverage thresholds * `npm run test:watch` runs karma in auto-watch mode, with source maps for both source and test files. * [karma](https://karma-runner.github.io/1.0/index.html) is used for running tests. * [tape](https://github.com/substack/tape) is used as the actual test runner. * [bel](https://github.com/shama/bel) is used for easy DOM fixtures. * [testdouble](https://github.com/testdouble/testdouble.js) is used for mocking/doubles. * [isparta](https://github.com/douglasduteil/isparta) is used to instrument source files for coverage. * [istanbul](https://github.com/gotwarlost/istanbul) is used to check and report coverage. * [eslint-plugin-tape](https://github.com/atabel/eslint-plugin-tape) is used for tape-specific test linting. resolves #4465
* `npm test` lints files, runs karma, reports coverages, checks coverage thresholds * `npm run test:watch` runs karma in auto-watch mode, with source maps for both source and test files. * `npm run fix` attempts to fix both CSS and JS lint issues in parallel * `npm run lint` lints JS and CSS in parallel * [karma](https://karma-runner.github.io/1.0/index.html) is used for running tests. * [tape](https://github.com/substack/tape) is used as the actual test runner. * [bel](https://github.com/shama/bel) is used for easy DOM fixtures. * [testdouble](https://github.com/testdouble/testdouble.js) is used for mocking/doubles. * [isparta](https://github.com/douglasduteil/isparta) is used to instrument source files for coverage. * [istanbul](https://github.com/gotwarlost/istanbul) is used to check and report coverage. * [eslint-plugin-tape](https://github.com/atabel/eslint-plugin-tape) is used for tape-specific test linting. resolves #4465
* `npm test` lints files, runs karma, reports coverages, checks coverage thresholds * `npm run test:watch` runs karma in auto-watch mode, with source maps for both source and test files. * `npm run fix` attempts to fix both CSS and JS lint issues in parallel * `npm run lint` lints JS and CSS in parallel * [karma](https://karma-runner.github.io/1.0/index.html) is used for running tests. * [tape](https://github.com/substack/tape) is used as the actual test runner. * [bel](https://github.com/shama/bel) is used for easy DOM fixtures. * [testdouble](https://github.com/testdouble/testdouble.js) is used for mocking/doubles. * [isparta](https://github.com/douglasduteil/isparta) is used to instrument source files for coverage. * [istanbul](https://github.com/gotwarlost/istanbul) is used to check and report coverage. * [eslint-plugin-tape](https://github.com/atabel/eslint-plugin-tape) is used for tape-specific test linting. resolves #4465
Resolved by #4567 |
The text was updated successfully, but these errors were encountered: