Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickP committed Aug 23, 2022
1 parent 6c68e8a commit 3a3cd86
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions gbfs-validator/__test__/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe('cli', () => {
summary: expect.objectContaining({
version: { detected: '2.2', validated: '2.2' },
hasErrors: true,
validatorVersion: '1.0.0',
errorsCount: 1
}),
files: expect.any(Array)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function build(opts = {}) {
system_id: 'shared_bike',
language: 'en',
name: 'Shared Bike USA',
timezone: 'UTC'
timezone: 'Etc/UTC'
}
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function build(opts = {}) {
system_id: 'shared_bike',
language: 'en',
name: 'Shared Bike USA',
timezone: 'UTC'
timezone: 'Etc/UTC'
}
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function build(opts = {}) {
system_id: 'shared_bike',
language: 'en',
name: 'Shared Bike USA',
timezone: 'UTC'
timezone: 'Etc/UTC'
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion gbfs-validator/__test__/fixtures/missing_vehicle_types.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function build(opts = {}) {
system_id: 'shared_bike',
language: 'en',
name: 'Shared Bike USA',
timezone: 'UTC'
timezone: 'Etc/UTC'
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion gbfs-validator/__test__/fixtures/plan_id.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function build(opts = {}) {
system_id: 'shared_bike',
language: 'en',
name: 'Shared Bike USA',
timezone: 'UTC'
timezone: 'Etc/UTC'
}
}
})
Expand Down
4 changes: 2 additions & 2 deletions gbfs-validator/__test__/fixtures/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function build(opts = {}) {
system_id: 'shared_bike',
language: 'en',
name: 'Shared Bike USA',
timezone: 'UTC'
timezone: 'Etc/UTC'
}
}
})
Expand All @@ -59,7 +59,7 @@ function build(opts = {}) {
system_id: 'shared_bike',
// language: 'en', // Missing language
name: 'Shared Bike USA',
timezone: 'UTC'
timezone: 'Etc/UTC'
}
}
})
Expand Down
7 changes: 5 additions & 2 deletions gbfs-validator/__test__/gbfs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ describe('conditional required vehicle_type_id', () => {
return gbfs.validation().then(result => {
expect(result).toMatchObject({
summary: expect.objectContaining({
validatorVersion: '1.0.0',
version: { detected: '2.2', validated: '2.2' },
hasErrors: true,
errorsCount: 2
Expand Down Expand Up @@ -557,6 +558,7 @@ describe('conditional no required vehicle_type_id', () => {
return gbfs.validation().then(result => {
expect(result).toMatchObject({
summary: expect.objectContaining({
validatorVersion: '1.0.0',
version: { detected: '2.2', validated: '2.2' }
}),
files: expect.arrayContaining([
Expand Down Expand Up @@ -646,12 +648,13 @@ describe('conditional plan_id', () => {
[
{
instancePath: '/data/vehicle_types/0/default_pricing_plan_id',
schemaPath: '#/properties/data/properties/vehicle_types/items/properties/default_pricing_plan_id/enum',
schemaPath:
'#/properties/data/properties/vehicle_types/items/properties/default_pricing_plan_id/enum',
keyword: 'enum',
params: {
allowedValues: ['p1']
},
message: "must be equal to one of the allowed values"
message: 'must be equal to one of the allowed values'
}
]
])
Expand Down

0 comments on commit 3a3cd86

Please sign in to comment.