I've recently delved back into TypeScript and started implementing TDD. I successfully set up ts-jest
to run my tests, but I've hit a roadblock with a seemingly simple issue that has me stumped.
organization.ts:
class Organization implements IOrganization {
id: Id;
name: string;
constructor(name: string) {
this.name = name;
}
}
export default Organization;
test.ts:
import Organization from "./organization";
import Simulation from "./simulation";
it('stores the user organization', () => {
let userOrganization = new Organization("does not matter");
}
While VS Code isn't showing any errors, when attempting to execute ts-jest
, I encounter an
error TS2554: Expected 0 arguments, but got 1
in my constructor. It feels like there's something obvious I'm overlooking.