-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test coverage to the set up middleware
- Loading branch information
Mateu Aguiló Bosch
committed
May 28, 2018
1 parent
a1904c7
commit e4246da
Showing
2 changed files
with
15 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,14 @@ | ||
// @flow | ||
|
||
const copyToRequestObject = require('./copyToRequestObject'); | ||
|
||
describe('The set up process', () => { | ||
test('It can copy variables', () => { | ||
expect.assertions(2); | ||
const req = {}; | ||
const next = jest.fn(); | ||
copyToRequestObject({ foo: 'bar' })(req, null, next); | ||
expect(req.foo).toBe('bar'); | ||
expect(next).toHaveBeenCalled(); | ||
}); | ||
}); |
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