Skip to content

Commit

Permalink
update tests, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpatrick committed May 6, 2024
1 parent 65779eb commit 081dcf4
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Radar.initialize('prj_test_pk_...', { /* options */ });
Add the following script in your `html` file
```html
<script src="https://js.radar.com/v4.2.0-beta.0/radar.min.js"></script>
<script src="https://js.radar.com/v4.2.0/radar.min.js"></script>
```

Then initialize the Radar SDK
Expand All @@ -73,8 +73,8 @@ To create a map, first initialize the Radar SDK with your publishable key. Then
```html
<html>
<head>
<link href="https://js.radar.com/v4.2.0-beta.0/radar.css" rel="stylesheet">
<script src="https://js.radar.com/v4.2.0-beta.0/radar.min.js"></script>
<link href="https://js.radar.com/v4.2.0/radar.css" rel="stylesheet">
<script src="https://js.radar.com/v4.2.0/radar.min.js"></script>
</head>

<body>
Expand All @@ -98,8 +98,8 @@ To create an autocomplete input, first initialize the Radar SDK with your publis
```html
<html>
<head>
<link href="https://js.radar.com/v4.2.0-beta.0/radar.css" rel="stylesheet">
<script src="https://js.radar.com/v4.2.0-beta.0/radar.min.js"></script>
<link href="https://js.radar.com/v4.2.0/radar.css" rel="stylesheet">
<script src="https://js.radar.com/v4.2.0/radar.min.js"></script>
</head>

<body>
Expand Down Expand Up @@ -130,8 +130,8 @@ To power [geofencing](https://radar.com/documentation/geofencing/overview) exper
```html
<html>
<head>
<link href="https://js.radar.com/v4.2.0-beta.0/radar.css" rel="stylesheet">
<script src="https://js.radar.com/v4.2.0-beta.0/radar.min.js"></script>
<link href="https://js.radar.com/v4.2.0/radar.css" rel="stylesheet">
<script src="https://js.radar.com/v4.2.0/radar.min.js"></script>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "radar-sdk-js",
"version": "4.2.0-beta.0",
"version": "4.2.0",
"description": "Web Javascript SDK for Radar, location infrastructure for mobile and web apps.",
"homepage": "https://radar.com",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions src/navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ class Navigator {
(err: GeolocationPositionError) => { // location call failed or user did not grant permission
if (err && err.code === 1) {
// https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPositionError
// code 1 means permission denied
// code 1 means location permissions denied
// codes 2 and 3 mean location unavailable or timeout
return reject(new RadarPermissionsError('Permission denied.'));
return reject(new RadarPermissionsError('Browser location permissions denied.'));
}
return reject(new RadarLocationError('Could not determine location.'));
},
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default '4.2.0-beta.0';
export default '4.2.0';
2 changes: 1 addition & 1 deletion test/api/track.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('Track', () => {
throw new Error('Test did not throw expected error.');
} catch (err: any) {
expect(err.name).toEqual('RadarPermissionsError');
expect(err.message).toEqual('Permission denied.');
expect(err.message).toEqual('Browser location permissions denied.');
expect(err.status).toEqual('ERROR_PERMISSIONS');
}
});
Expand Down
2 changes: 1 addition & 1 deletion test/navigator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Navigator', () => {
throw new Error('Response should not succeed.');
} catch (err: any) {
expect(err.name).toEqual('RadarPermissionsError');
expect(err.message).toEqual('Permission denied.');
expect(err.message).toEqual('Location permissions denied.');
expect(err.status).toEqual('ERROR_PERMISSIONS');
}
});
Expand Down

0 comments on commit 081dcf4

Please sign in to comment.