Skip to content

Commit

Permalink
Merge pull request #419 from gemini-testing/sp.ignore
Browse files Browse the repository at this point in the history
feat(sets): add set.ignoreFiles option to ignore dirs while test finding
  • Loading branch information
sipayRT authored Jul 9, 2019
2 parents 370e3b8 + 53749c8 commit 8463e56
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 1,249 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,8 @@ sets: {
files: [
'tests/desktop/*.hermione.js',
'tests/common/*.hermione.js'
]
],
ignoreFiles: ['tests/desktop/fixtures/**'], // exclude directories from reading while test finding
browsers: ['browser'] // run tests which match the specified masks in the browser with the `browser` id
}
}
Expand All @@ -456,6 +457,8 @@ sets: {
* `files` – A list of test files or directories with test files. This can be a string if you want to specify just one file or directory. Also, you can use
masks for this property.

* `ignoreFiles` - A list of paths or masks to ignore from reading while test finding. When you write `!**/some-dir/**` it means that the directory will be read, but all the entries will not be included in the results. So using `ignoreFiles` you can speed up test reading for your project.

* `browsers` – A list of browser IDs to run the tests specified in `files`. All browsers by default.

You can specify sets to run using the CLI option `--set`.
Expand Down Expand Up @@ -889,7 +892,7 @@ module.exports = (hermione) => {
const workerFilepath = require.resolve('./worker');
const exportedMethods = ['foo'];
workers = runner.registerWorkers(workerFilepath, exportedMethods);

// outputs `FOO_RUNNER_START`
console.log(await workers.foo('RUNNER_START'));
});
Expand All @@ -903,7 +906,7 @@ module.exports = (hermione) => {
// worker.js
module.exports = {
foo: async function(event) {
return 'FOO_' + event;
return 'FOO_' + event;
}
};

Expand Down
Loading

0 comments on commit 8463e56

Please sign in to comment.