fix(docs-infra): fix filtering in run-example-e2e.js (#28663)
PR Close #28663
This commit is contained in:
parent
cb0a8b566f
commit
5cafd44654
@ -325,7 +325,7 @@ function getE2eSpecs(basePath, filter) {
|
|||||||
// Find all e2e specs in a given example folder.
|
// Find all e2e specs in a given example folder.
|
||||||
function getE2eSpecsFor(basePath, specFile, filter) {
|
function getE2eSpecsFor(basePath, specFile, filter) {
|
||||||
// Only get spec file at the example root.
|
// 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})
|
return globby(e2eSpecGlob, {cwd: basePath, nodir: true})
|
||||||
.then(
|
.then(
|
||||||
paths => paths.filter(file => !IGNORED_EXAMPLES.some(ignored => file.startsWith(ignored)))
|
paths => paths.filter(file => !IGNORED_EXAMPLES.some(ignored => file.startsWith(ignored)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user