-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dedicated): added baseUrl for the Dedicated Mode
- Loading branch information
1 parent
c6cca78
commit 06a6818
Showing
7 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { getExpressApp } from './utils.js'; | ||
import { dedicated } from '../src/index.js'; | ||
|
||
const app = getExpressApp(); | ||
|
||
describe('Generic Cases Related to Dedicated Mode', () => { | ||
describe('baseUrl', () => { | ||
it('should append baseUrl to the beginning of the path request', async () => { | ||
// literally calls the endpoint /redirect | ||
const request = dedicated(app, { | ||
baseUrl: '/redirect' | ||
}); | ||
|
||
const res = await request.get('/'); | ||
|
||
expect(res.statusCode).toBe(301); | ||
expect(res.redirect).toBe(true); | ||
}); | ||
}); | ||
}); |
File renamed without changes.