Skip to content

Commit 720a35d

Browse files
authored
Merge branch 'main' into patch-1
2 parents 7632415 + 949835f commit 720a35d

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

.github/.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ coverage:
1313
threshold: 2%
1414
patch:
1515
default:
16-
target: 95%
16+
target: 40%
1717
threshold: 1%

src/vehicle.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
import type { Faker } from '.';
2-
import type { Fake } from './fake';
3-
4-
let fake: Fake['fake'];
52

63
/**
74
* Module to generate vehicle related entries.
85
*/
96
export class Vehicle {
107
constructor(private readonly faker: Faker) {
11-
fake = faker.fake;
12-
138
// Bind `this` so namespaced is working correctly
149
for (const name of Object.getOwnPropertyNames(Vehicle.prototype)) {
1510
if (name === 'constructor' || typeof this[name] !== 'function') {
@@ -26,7 +21,7 @@ export class Vehicle {
2621
* faker.vehicle.vehicle() // 'BMW Explorer'
2722
*/
2823
vehicle(): string {
29-
return fake('{{vehicle.manufacturer}} {{vehicle.model}}');
24+
return `${this.manufacturer()} ${this.model()}`;
3025
}
3126

3227
/**
@@ -98,7 +93,7 @@ export class Vehicle {
9893
* faker.vehicle.color() // 'red'
9994
*/
10095
color(): string {
101-
return fake('{{commerce.color}}');
96+
return this.faker.commerce.color();
10297
}
10398

10499
/**

0 commit comments

Comments
 (0)