@tsed/platform-test-sdk
Version:
Package to test platform adapter integration with Ts.ED
27 lines (26 loc) • 670 B
JavaScript
import { PlatformTest } from "@tsed/platform-http/testing";
import { specsContainer } from "../tests/exports.js";
export class PlatformTestSdk {
constructor(options) {
this.options = options;
}
static create(options) {
return new PlatformTestSdk(options);
}
test(name, options = {}) {
specsContainer.get(name)({
...this.options,
...options
});
}
bootstrap(options = {}) {
return PlatformTest.bootstrap({
...this.options,
rootModule: this.options.server,
...options
});
}
reset() {
return PlatformTest.reset();
}
}