-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inital setup for search test (#2757)
Add the setup path
- Loading branch information
1 parent
1d3a59e
commit 9cfc73a
Showing
3 changed files
with
19 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const baseConfig = require('../../../jest.config.base'); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
rootDir: '../../..', | ||
setupFiles: ['<rootDir>/src/api/search/jest.setup.js'], | ||
testMatch: ['<rootDir>/src/api/search/test/*.test.js'], | ||
collectCoverageFrom: ['<rootDir>/src.api/search/src/**/*.js'], | ||
}; |
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 @@ | ||
process.env = { ...process.env, MOCK_ELASTIC: '1' }; |
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,9 @@ | ||
const request = require('supertest'); | ||
const { app } = require('../src'); | ||
|
||
describe('/query routers', () => { | ||
it('return error 400 if no params given', async () => { | ||
const res = await request(app).get('/'); | ||
expect(res.status).toBe(400); | ||
}); | ||
}); |