Having trouble running TypeScript tests with Jest/SuperTest - when running npm test
, I encounter the following errors:
Which package am I missing or not importing?
FAIL test/test.ts
● Test suite failed to run
test/test.ts:8:3 - error TS2304: Cannot find name 'before'.
8 before(PlatformTest.bootstrap(Server));
~~~~~~
test/test.ts:9:3 - error TS2304: Cannot find name 'before'.
9 before(() => {
~~~~~~
test/test.ts:12:3 - error TS2304: Cannot find name 'after'.
12 after(PlatformTest.reset);
Here are the imports I have used:
import {PlatformTest} from "@tsed/common";
import * as SuperTest from "supertest";
import {Server} from "../src/Server";