Coverage functions with TypeORM entity is always 0
See original GitHub issue🐛 Bug Report
Coverage functions with TypeORM entity is always 0. Please see attached screenshot. I have relations decorator
@ManyToMany(type => Group, { cascade: true })
and coverage for type => Group arrow function is 0
To Reproduce
Create an entity with relations decorator
import {
Entity,
Column,
PrimaryGeneratedColumn,
ManyToMany,
JoinTable,
} from 'typeorm';
import { Group } from '../group/group.entity';
@Entity()
export class User {
@PrimaryGeneratedColumn()
id: number;
@Column({ length: 32, unique: true, readonly: true })
uid: string;
@ManyToMany(type => Group, { cascade: true })
@JoinTable()
groups: Group[];
}
Expected behavior
Function coverage should be 100%
Link to repl or repo (highly encouraged)
Please see the attached screenshot.
Run npx envinfo --preset jest
Paste the results here:
npx: installed 1 in 1.542s
System:
OS: macOS 10.14
CPU: x64 Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz
Binaries:
Node: 10.10.0 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
npmPackages:
@types/jest: ^23.3.1 => 23.3.2
jest: ^23.6.0 => 23.6.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
typeorm/typeorm - Gitter
I'm having a hard time setting the current timestamp to a column on an MySQL database. My entity is the following: @Column({ nullable:...
Read more >TypeORM- findOne returns unexpected value - Stack Overflow
I have a User Entity with an Email Column. When I use TypeORM's findOne function to search for a Email which doesn't exist...
Read more >TypeORM Tips (Part 1: Don't use save()) - DEV Community
First, it uses a SELECT query to search for an existing entity. If step 1 returns a record, it uses UPDATE to update...
Read more >Complete guide to using TypeORM and TypeScript for data ...
In this article we'll learn about using TypeORM to set up Entity ... The CustomRepository class will provide high level functions for the ......
Read more >TypeORM Relations Tutorial - FULL details! - YouTube
We're going to cover all the typical table relationships you might ... them to each other 36:00 - Querying entities with their relations ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have no idea, that has nothing to do with Jest though.
Ignoring it unless you actually execute some stuff seems like a good compromise.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.