-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
@@ -0,0 +1,3 @@ | |||
{ | |||
"arcgisPortal": "https://www.arcgis.com" |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
|
||
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) |
There was a problem hiding this comment.
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?$', |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done!
This PR wires the formatting logic up to the AGO API, and the datasets from the Hub Search API.