Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashwin Kumar committed Apr 27, 2024
1 parent 8719a92 commit 31af65d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
23 changes: 0 additions & 23 deletions packages/core/__tests__/parseAWSExports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,29 +197,6 @@ describe('parseAWSExports', () => {
).toStrictEqual(expected);
});

it('should parse valid aws-exports.js for Geo', () => {
const expected = {
Geo: {
LocationService: amazonLocationServiceV4,
},
};
// aws-exports.js has geo "search_indices" in snake_case
expect(
parseAWSExports({
aws_project_region: 'us-west-2',
geo: { amazon_location_service: amazonLocationService },
}),
).toStrictEqual(expected);

// aws-exports.js has geo "searchIndices" in camelCase
expect(
parseAWSExports({
aws_project_region: 'us-west-2',
geo: { amazon_location_service: amazonLocationServiceV4 },
}),
).toStrictEqual(expected);
});

it('should fallback to IAM auth mode if Appsync auth type is invalid', () => {
expect(
parseAWSExports({
Expand Down
4 changes: 1 addition & 3 deletions packages/core/src/parseAWSExports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,7 @@ export const parseAWSExports = (
...amazon_location_service,
maps: amazon_location_service.maps,
geofenceCollections: amazon_location_service.geofenceCollections,
searchIndices:
amazon_location_service.search_indices ??
amazon_location_service.searchIndices,
searchIndices: amazon_location_service.search_indices,
region: amazon_location_service.region,
},
}
Expand Down

0 comments on commit 31af65d

Please sign in to comment.