小编Ren*_*don的帖子

How to cover TypeORM @Column decorator with Jest unit testing?

I want to Unit and e2e test my applications as much as possible and my goal is a coverage of 101%. Problem right now with my setup is, that the @Column decorator from typeorm uses an arrow function to set a default value like the current timestamp on a database update. This arrow function is not covered with jest test coverage. Message is: statement not covered

I run the code coverage with: jest --coverage. My versions:

"jest": "^24.9.0",
"typeorm": …
Run Code Online (Sandbox Code Playgroud)

unit-testing typescript jestjs typeorm nestjs

5
推荐指数
1
解决办法
1575
查看次数

标签 统计

jestjs ×1

nestjs ×1

typeorm ×1

typescript ×1

unit-testing ×1