Skip to content

Commit

Permalink
test: fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
thynson committed Sep 12, 2021
1 parent 9736752 commit a9afbe2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
2 changes: 0 additions & 2 deletions packages/core/tests/deprecate.spec.ts
Expand Up @@ -100,7 +100,6 @@ describe('Deprecate on class', () => {
container.add(X);
container.add(Y);
container.add(V);
container.compile();

expect(container.resolve(X)).toBeInstanceOf(X);
expect(stub).lastCalledWith(X);
Expand Down Expand Up @@ -179,7 +178,6 @@ describe('Deprecate instance method', () => {
value: result,
});
container.add(X);
container.compile();
try {
expect(invokeMethod(container.createResolveContext(), X, 'foo')).toBe(result);
} catch (e) {
Expand Down
1 change: 0 additions & 1 deletion packages/http-koa-platform/src/http-module.ts
Expand Up @@ -14,7 +14,6 @@ import {
ModuleOption,
ModuleScanner,
OnModuleCreate,
OnModuleDestroy,
OnStart,
OnStop,
provideOptionInjector,
Expand Down
8 changes: 4 additions & 4 deletions packages/http-koa-platform/tests/http-koa-integration.spec.ts
Expand Up @@ -75,7 +75,7 @@ describe('KoaHttpApplicationBuilder', () => {
}

const container = new Container();
container.add(FooController).compile();
container.add(FooController);
const koaHttpApplicationBuilder = new KoaHttpApplicationBuilder();
koaHttpApplicationBuilder.addControllerWithMetadata(getHttpControllerMetadata(FooController)!);
const koaHttpApplication = koaHttpApplicationBuilder.build(
Expand Down Expand Up @@ -107,7 +107,7 @@ describe('KoaHttpApplicationBuilder', () => {
}

const container = new Container();
container.add(FooController).compile();
container.add(FooController);
const koaHttpApplicationBuilder = new KoaHttpApplicationBuilder();
koaHttpApplicationBuilder.addControllerWithMetadata(getHttpControllerMetadata(FooController)!);
const koaHttpApplication = koaHttpApplicationBuilder.build(
Expand Down Expand Up @@ -184,7 +184,7 @@ describe('KoaHttpApplicationBuilder', () => {
}

const container = new Container();
container.add(FooController).compile();
container.add(FooController);
const koaHttpApplicationBuilder = new KoaHttpApplicationBuilder();
koaHttpApplicationBuilder.addGlobalInterceptProvider(InterceptorA);
koaHttpApplicationBuilder.addControllerWithMetadata(getHttpControllerMetadata(FooController)!);
Expand Down Expand Up @@ -245,7 +245,7 @@ describe('KoaHttpApplicationBuilder', () => {
}

const container = new Container();
container.add(FooController).compile();
container.add(FooController);
const koaHttpApplicationBuilder = new KoaHttpApplicationBuilder();
const middlewareSpy = jest.fn();
koaHttpApplicationBuilder.clearMiddleware();
Expand Down
13 changes: 2 additions & 11 deletions packages/http-koa-platform/tests/http-module.spec.ts
@@ -1,17 +1,8 @@
import {
ApplicationRunner,
Component,
createModule,
Inject,
ModuleClass,
OnModuleCreate,
OnStart,
ProcessManager,
} from '@sensejs/core';
import {ApplicationRunner, Component, createModule, Inject, ModuleClass, OnStart, ProcessManager} from '@sensejs/core';
import supertest from 'supertest';
import {Server} from 'http';
import {AddressInfo} from 'net';
import {Controller, GET, HttpContext, Query} from '@sensejs/http-common';
import {Controller, GET, Query} from '@sensejs/http-common';
import {createHttpModule, KoaHttpApplicationBuilder} from '../src';
import {InterceptProviderClass} from '@sensejs/container';

Expand Down

0 comments on commit a9afbe2

Please sign in to comment.