UNPKG

1.01 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3require("reflect-metadata");
4const _metadata_keys_1 = require("./_metadata-keys");
5const unused_1 = require("../unused");
6const mark_property_as_test_1 = require("./mark-property-as-test");
7const deprecate_1 = require("../maintenance/deprecate");
8function 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}
20exports.AsyncTest = AsyncTest;
21//# sourceMappingURL=async-test-decorator.js.map
\No newline at end of file