Skip to content

Commit

Permalink
fix: key name
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Feb 11, 2022
1 parent 550e503 commit fe62342
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/definitions/vehicle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface VehicleDefinitions {
/**
* Some types of bicycles.
*/
bicycle: string[];
bicycle_type: string[];
/**
* Some types of fuel (e.g. `Gasoline`).
*/
Expand All @@ -30,7 +30,7 @@ export interface VehicleDefinitions {
* Internal: A list of all keys for the VehicleDefinitions.
*/
export const VEHICLE = allOf<keyof VehicleDefinitions>()(
'bicycle',
'bicycle_type',
'fuel',
'manufacturer',
'model',
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en/vehicle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import model from './model';
import type_ from './type';

const vehicle = {
bicycle,
bicycle_type: bicycle,
fuel,
manufacturer,
model,
Expand Down
2 changes: 1 addition & 1 deletion src/locales/ur/vehicle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import model from './model';
import type_ from './type';

const vehicle: any = {
bicycle,
bicycle_type: bicycle,
fuel,
manufacturer,
model,
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class Vehicle {
*/
bicycle(): string {
return this.faker.random.arrayElement(
this.faker.definitions.vehicle.bicycle
this.faker.definitions.vehicle.bicycle_type
);
}
}
2 changes: 1 addition & 1 deletion test/vehicle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe('vehicle', () => {

expect(bicycle).toBeTruthy();
expect(typeof bicycle).toBe('string');
expect(faker.definitions.vehicle.bicycle).toContain(bicycle);
expect(faker.definitions.vehicle.bicycle_type).toContain(bicycle);
});
});
}
Expand Down

0 comments on commit fe62342

Please sign in to comment.