1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1× 1× 51× 51× 9× 51× 51× | import "reflect-metadata"; export function Setup(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<() => any>) { let setupFunctions: Array<string> = Reflect.getMetadata("alsatian:setup", target); if (!setupFunctions) { setupFunctions = []; } setupFunctions.push(propertyKey); // mark as setup test method Reflect.defineMetadata("alsatian:setup", setupFunctions, target); }; |