Skip to content

Commit

Permalink
Some clarity, cleanup, and snapshot updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders committed Mar 13, 2020
1 parent 26dc6a3 commit dcedceb
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { createAssignmentProxy } from './assignment_proxy';
import { wrapFunction } from './wrap_function';
import { wrapRunnableArgs } from './wrap_runnable_args';

export function decorateMochaUi(lifecycle, context, config) {
export function decorateMochaUi(lifecycle, context) {
// incremented at the start of each suite, decremented after
// so that in each non-suite call we can know if we are within
// a suite, or that when a suite is defined it is within a suite
Expand Down Expand Up @@ -66,11 +66,9 @@ export function decorateMochaUi(lifecycle, context, config) {
this._tags = [].concat(this._tags || [], tags);
};

const filePath = this.file.replace(REPO_ROOT + sep, '');
this.tags(filePath);
this.suiteTag = filePath; // The tag that uniquely targets this suite/file

this.ftrConfig = config;
const relativeFilePath = this.file.replace(REPO_ROOT + sep, '');
this.tags(relativeFilePath);
this.suiteTag = relativeFilePath; // The tag that uniquely targets this suite/file

provider.call(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export async function setupMocha(lifecycle, log, config, providers) {
updateBaselines: config.get('updateBaselines'),
});

// Each suite has a tag that is the path relative to the root of the repo
// So we just need to take input paths, make them relative to the root, and use them as tags
filterSuitesByTags({
log,
mocha,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dcedceb

Please sign in to comment.