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) {
|
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)) {
|
for (const name of fixtureParameterNames(fn, location)) {
|
||||||
const registration = this.registrations.get(name);
|
const registration = this.registrations.get(name);
|
||||||
if (!registration)
|
if (!registration)
|
||||||
throw errorWithLocations(`${prefix} has unknown parameter "${name}".`, { location, name: prefix, quoted: false });
|
throw errorWithLocations(`${prefix} has unknown parameter "${name}".`, { location, name: prefix, quoted: false });
|
||||||
visit(registration);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue