• Robert Knight's avatar
    Reduce test startup time when running a subset of tests · a9fe3c0a
    Robert Knight authored
    Change the way that the `FILTER` option works in `make test FILTER=<pattern>`
    (or equivalently the `--grep` option if using `gulp test --grep
    <pattern>`) to control which test files are executed rather than
    matching test descriptions.
    
    This enables the test configuration function in `src/karma.config.js` to
    limit the test bundle to only the matching files and their dependencies.
    This can make the initial bundling much faster and bundle updates (when
    using `make servetests`) somewhat faster.
    
    On my system, `make test FILTER=menu-item` takes ~40s on master but only
    ~7s on this branch.
    
    As before, the filename filter can be combined with the `.only` modifier
    on `description` or `it` calls to do more fine-grained filtering of
    tests within matching files.
    
     - Change `--grep` option to gulp to filter test files as part of the
       test bundling process instead of setting the `grep` mocha option
    
     - Make `make servetests` accept a `FILTER` argument for consistency
       with `make test`
    
     - Simplify code in gulpfile.js for launching Karma
    
     - Update documentation for `make test`
    a9fe3c0a
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
docs Loading commit data...
embedding-examples Loading commit data...
images Loading commit data...
scripts Loading commit data...
src Loading commit data...
.babelrc Loading commit data...
.dockerignore Loading commit data...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.npmrc Loading commit data...
.prettierignore Loading commit data...
.prettierrc Loading commit data...
.python-version Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT Loading commit data...
Dockerfile Loading commit data...
Jenkinsfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
gulpfile.js Loading commit data...
package.json Loading commit data...
requirements-dev.in Loading commit data...
tox.ini Loading commit data...
yarn.lock Loading commit data...