Skip to content

Commit

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

Ensures that API routes are working as expected with `concurrentFeatures: true`. Closes #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 committed Nov 9, 2021
1 parent 7087adb commit e1464ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default (req, res) => {
res.end('pong')
}
Original file line number Diff line number Diff line change
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 e1464ae

Please sign in to comment.