You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apps/apim/tests/unit/services/endpoint.service.test.ts
● Test suite failed to run
@Table annotation is missing on class "EndPoint"
4 | import { glob } from "glob";
5 |
> 6 | const sequelize = new Sequelize({
| ^
7 | dialect: "mysql",
8 | // sync: { force: true },
9 | // sync: { alter: true },
at node_modules/sequelize-typescript/dist/sequelize/sequelize/sequelize.js:68:23
at Array.map (<anonymous>)
at Sequelize.defineModels (node_modules/sequelize-typescript/dist/sequelize/sequelize/sequelize.js:61:23)
at Sequelize.addModels (node_modules/sequelize-typescript/dist/sequelize/sequelize/sequelize.js:37:36)
at new Sequelize (node_modules/sequelize-typescript/dist/sequelize/sequelize/sequelize.js:20:22)
at Object.<anonymous> (libs/core/database/index.ts:6:19)
at Object.<anonymous> (apps/apim/services/api.service.ts:17:1)
at Object.<anonymous> (apps/apim/services/endpoint.service.ts:8:1)
at Object.<anonymous> (apps/apim/__tests__/unit/services/endpoint.service.test.ts:5:1)
this is my table @table({ modelName: 'apim_api' })
export default class API extends Model { @column({
type: DataType.UUID,
primaryKey: true,
defaultValue: DataType.UUIDV4,
})
id: string;
Hello , Im writing a jest test for my application writting in typescript
Any time a mocked the Model class this way ,
jest.mock("@apps/apim/entities/server.entity");
jest.mock("@apps/apim/entities/api.entity");
I got this error
apps/apim/tests/unit/services/endpoint.service.test.ts
● Test suite failed to run
this is my table
@table({ modelName: 'apim_api' })
export default class API extends Model {
@column({
type: DataType.UUID,
primaryKey: true,
defaultValue: DataType.UUIDV4,
})
id: string;
The text was updated successfully, but these errors were encountered: