Skip to content

add route handler #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 29, 2021
Merged

add route handler #2

merged 10 commits into from
Jul 29, 2021

Conversation

drewdaemon
Copy link
Contributor

This PR wires the formatting logic up to the AGO API, and the datasets from the Hub Search API.

@@ -0,0 +1,3 @@
{
"arcgisPortal": "https://www.arcgis.com"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure on the naming here...

});

it('handles a DCAT request', async () => {
await request(app)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opted for the supertest route to flex the handler as realistically as possible.

@drewdaemon drewdaemon requested a review from rgwozdz July 29, 2021 17:06

const siteUrl = 'https://foobar.hub.arcgis.com'
const orgTitle = 'My Fun Org'
const portalUrl = 'https://my-fun-org.maps.arcgis.com'

describe('DcatDataset', () => {
it('Dataset props come from right places', function() {
const dataset = new DcatDataset(datasetFromApi.attributes, portalUrl, orgTitle, siteUrl)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we got the whole response back from Mark's searchContent Hub.js function, but we actually just get the attributes.

@@ -11,7 +11,7 @@ module.exports = {
"json",
"node",
],
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(ts|js)x?$',
testRegex: '(/__tests__/.src|(\\.|/)(test|spec))\\.(ts|js)x?$',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jest was looking in the ./build folder, so I scoped this down.

@drewdaemon drewdaemon requested a review from rgwozdz July 29, 2021 19:39
Copy link
Member

@rgwozdz rgwozdz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done!

@drewdaemon drewdaemon merged commit 6c83651 into main Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants