@tsed/platform-test-sdk
Version:
Package to test platform adapter integration with Ts.ED
26 lines (25 loc) • 646 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.server, {
...this.options,
...options
});
}
reset() {
return PlatformTest.reset();
}
}