fix(docs-infra): fix filtering in run-example-e2e.js (#28663)

PR Close #28663
This commit is contained in:
Kapunahele Wong 2019-02-12 15:03:24 -05:00 committed by Miško Hevery
parent cb0a8b566f
commit 5cafd44654
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ function getE2eSpecs(basePath, filter) {
// Find all e2e specs in a given example folder.
function getE2eSpecsFor(basePath, specFile, filter) {
// Only get spec file at the example root.
const e2eSpecGlob = `${filter ? '*' + filter + '*' : '*'}/${specFile}`;
const e2eSpecGlob = `${filter ? `*${filter}*` : '*'}/${specFile}`;
return globby(e2eSpecGlob, {cwd: basePath, nodir: true})
.then(
paths => paths.filter(file => !IGNORED_EXAMPLES.some(ignored => file.startsWith(ignored)))