Comments (2)
Fixed by adding
**import { initializeTransactionalContext } from 'typeorm-transactional';**
import { AppModule } from '../src/app.module';
describe('AuthController (e2e)', () => {
let app: INestApplication;
let accessToken: string;
beforeAll(async () => {
**initializeTransactionalContext();**
const moduleFixture = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleFixture.createNestApplication();
await app.init();
});
but then I get next error
[Nest] 65272 - 12/12/2023, 12:37:56 PM ERROR [ExceptionsHandler] You need to use @UseDto on class (UserEntity) be able to call toDto function
Error: You need to use @UseDto on class (UserEntity) be able to call toDto function
at UserEntity.toDto (/Users/aleksey.topchy/IdeaProjects/philit/medical/aip-back/src/common/abstract.entity.ts:24:19)
at AuthController.userRegister (/Users/aleksey.topchy/IdeaProjects/philit/medical/aip-back/src/modules/auth/auth.controller.ts:33:28)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
console.log
query: SELECT "UserEntity"."id" AS "UserEntity_id", "UserEntity"."created_at" AS "UserEntity_created_at", "UserEntity"."updated_at" AS "UserEntity_updated_at", "UserEntity"."first_name" AS "UserEntity_first_name", "UserEntity"."last_name" AS "UserEntity_last_name", "UserEntity"."role" AS "UserEntity_role", "UserEntity"."email" AS "UserEntity_email", "UserEntity"."password" AS "UserEntity_password", "UserEntity"."phone" AS "UserEntity_phone", "UserEntity"."avatar" AS "UserEntity_avatar", (SELECT CONCAT("UserEntity".first_name, ' ', "UserEntity".last_name)) AS "UserEntity_full_name" FROM "users" "UserEntity" WHERE ("UserEntity"."email" = $1) LIMIT 1 -- PARAMETERS: ["[email protected]"]
at Function.logInfo (../src/platform/PlatformTools.ts:232:17)
from awesome-nest-boilerplate.
Fixed it by this issue workaround
#332
from awesome-nest-boilerplate.
Related Issues (20)
- Error when using pagination and specify column select HOT 3
- How to integrate Firebase?
- AuthController unit test not working HOT 2
- controller return type
- ERROR [ExceptionsHandler] No metadata for "UserEntity" was found. HOT 1
- [Feature Request] Add logging with verbosity levels HOT 1
- Error received from user registration endpoint HOT 2
- Error when running "yarn migration:generate migration_name" HOT 4
- No resolvers provided! nestjs-i18n won't workt properly, please follow the quick-start guide: https://nestjs-i18n.com/quick-start HOT 1
- Project runs but is not being served HOT 1
- error TS2550: Property 'replaceAll' does not exist on type 'string'. HOT 5
- Sweep: Write a test for src/modules/auth/auth.controller.ts HOT 3
- Eslint Not working HOT 1
- HttpExceptionFilter to translation interceptor
- ERROR [ExceptionsHandler] You need to use @UseDto on class (ClassNameEntity) be able to call toDto function HOT 2
- main.hmr.ts is not working HOT 1
- e2e test fails with "No context available. ns.run() or ns.bind() must be called first."
- yarn build:prod fail
- LLM Integration using Langchain
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awesome-nest-boilerplate.