Skip to content

Commit

Permalink
Add integration test of API routes with concurrentFeatures enabled (v…
Browse files Browse the repository at this point in the history
…ercel#31227)

Ensures that API routes are working as expected with `concurrentFeatures: true`. Closes vercel#30586.

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
  • Loading branch information
shuding authored and natew committed Feb 16, 2022
1 parent 6280b06 commit 33a85ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
@@ -0,0 +1,3 @@
export default (req, res) => {
res.end('pong')
}
Expand Up @@ -288,6 +288,11 @@ async function runBasicTests(context) {
const content = await browser.eval(`window.document.body.innerText`)
expect(content).toMatchInlineSnapshot('"next_streaming_data"')
})

it('should support api routes', async () => {
const res = await renderViaHTTP(context.appPort, '/api/ping')
expect(res).toContain('pong')
})
}

function runSuite(suiteName, env, { runTests, before, after }) {
Expand Down

0 comments on commit 33a85ad

Please sign in to comment.