Skip to content

Commit

Permalink
Add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot committed Jul 2, 2020
1 parent 52f67c4 commit 30f575e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/integration/basepath/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,18 @@ const runTests = (context, dev = false) => {
expect(pathname).toBe('/docs/hello')
})

it('should redirect trailing slash on root correctly', async () => {
const res = await fetchViaHTTP(
context.appPort,
'/docs/',
{},
{ redirect: 'manual' }
)
expect(res.status).toBe(308)
const { pathname } = new URL(res.headers.get('location'))
expect(pathname).toBe('/docs')
})

it('should 404 when manually adding basePath with <Link>', async () => {
const browser = await webdriver(
context.appPort,
Expand Down

0 comments on commit 30f575e

Please sign in to comment.