alsatian-test/alsatian

View on GitHub
packages/alsatian/core/decorators/focus-decorator.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { FOCUS } from "./_metadata-keys";

export function Focus(
    target: object | (new (...args: Array<any>) => object),
    propertyKey?: string | symbol
) {
    if (propertyKey) {
        // mark test method as focussed
        Reflect.defineMetadata(FOCUS, true, target, propertyKey);
    } else {
        // mark test method as focussed
        Reflect.defineMetadata(FOCUS, true, target);
    }
}