mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore(runner): remove unnecessary traversal (#17415)
This commit is contained in:
parent
8d639ae50e
commit
ee83694372
@ -282,15 +282,10 @@ export class FixturePool {
|
||||
}
|
||||
|
||||
validateFunction(fn: Function, prefix: string, location: Location) {
|
||||
const visit = (registration: FixtureRegistration) => {
|
||||
for (const name of registration.deps)
|
||||
visit(this.resolveDependency(registration, name)!);
|
||||
};
|
||||
for (const name of fixtureParameterNames(fn, location)) {
|
||||
const registration = this.registrations.get(name);
|
||||
if (!registration)
|
||||
throw errorWithLocations(`${prefix} has unknown parameter "${name}".`, { location, name: prefix, quoted: false });
|
||||
visit(registration);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user