src/DataSeeding/Seeders/UserSeeder.ts   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 12
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 9
mnd 0
bc 0
fnc 1
dl 0
loc 12
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10

1 Function

Rating   Name   Duplication   Size   Complexity  
A UserSeeder.run 0 5 1
1
import { Seeder } from '@concepta/typeorm-seeding';
2
import { UserFactory, JohnFactory } from '../Factories/UserFactory';
3
4
export class UserSeeder extends Seeder {
5
  async run() {
6
    const userFactory = this.factory(UserFactory);
7
    const johnFactory = this.factory(JohnFactory);
8
    await johnFactory.create();
9
    await userFactory.createMany(5);
10
  }
11
}
12