1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | require("reflect-metadata");
|
4 | const _metadata_keys_1 = require("./_metadata-keys");
|
5 | function markPropertyAsTest(propertyKey, target) {
|
6 | let tests = Reflect.getMetadata(_metadata_keys_1.TESTS, target);
|
7 | if (!tests) {
|
8 | tests = [
|
9 | {
|
10 | key: propertyKey
|
11 | }
|
12 | ];
|
13 | Reflect.defineMetadata(_metadata_keys_1.TESTS, tests, target);
|
14 | }
|
15 | else if (tests.filter(test => test.key === propertyKey).length === 0) {
|
16 | tests.push({
|
17 | key: propertyKey
|
18 | });
|
19 | Reflect.defineMetadata(_metadata_keys_1.TESTS, tests, target);
|
20 | }
|
21 | }
|
22 | exports.markPropertyAsTest = markPropertyAsTest;
|
23 |
|
\ | No newline at end of file |