Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverb123 committed Jul 6, 2024
1 parent 8b5e30c commit 8060013
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,14 @@ test('person props default to null if no values present', async () => {
})
expect(event!.properties!.$set_once).toEqual({
$initial_geoip_city_name: null, // default to null
$initial_geoip_city_confidence: null,
$initial_geoip_country_name: 'Sweden',
$initial_geoip_country_code: 'SE',
$initial_geoip_continent_name: 'Europe',
$initial_geoip_continent_code: 'EU',
$initial_geoip_latitude: 58.4167,
$initial_geoip_longitude: 15.6167,
$initial_geoip_accuracy_radius: 76,
$initial_geoip_time_zone: 'Europe/Stockholm',
$initial_geoip_subdivision_1_code: 'E',
$initial_geoip_subdivision_1_name: 'Östergötland County',
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const plugin: Plugin = {
const location: Record<string, any> = {}

Check warning on line 54 in index.ts

View workflow job for this annotation

GitHub Actions / Code quality

Unexpected any. Specify a different type
if (response.city) {
location['city_name'] = response.city.names?.en
location['city_confidence'] = response.city.confidence
location['city_confidence'] = response.city.confidence ?? null
}
if (response.country) {
location['country_name'] = response.country.names?.en
Expand Down

0 comments on commit 8060013

Please sign in to comment.