1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | require("reflect-metadata");
|
4 | const _metadata_keys_1 = require("./_metadata-keys");
|
5 | const unused_1 = require("../unused");
|
6 | const mark_property_as_test_1 = require("./mark-property-as-test");
|
7 | const deprecate_1 = require("../maintenance/deprecate");
|
8 | function AsyncTest(description) {
|
9 | return (target, propertyKey, descriptor) => {
|
10 | unused_1.Unused(descriptor);
|
11 | deprecate_1.deprecate("AsyncTest", "4.0.0", "Use the Test decorator instead.");
|
12 | mark_property_as_test_1.markPropertyAsTest(propertyKey, target);
|
13 | const tests = Reflect.getMetadata(_metadata_keys_1.TESTS, target);
|
14 | const testDefinition = tests.filter(test => test.key === propertyKey)[0];
|
15 | testDefinition.isAsync = true;
|
16 | testDefinition.description = description;
|
17 | Reflect.defineMetadata(_metadata_keys_1.TESTS, tests, target);
|
18 | };
|
19 | }
|
20 | exports.AsyncTest = AsyncTest;
|
21 |
|
\ | No newline at end of file |