Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update src/flow-control/log-timings.js
Co-authored-by: Gustavo Henke <guhenke@gmail.com>
- Loading branch information
1 parent
2bc5bcc
commit 596c9de
Showing
10 changed files
with
102 additions
and
43 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
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,22 @@ | ||
const stream = require('stream'); | ||
const { createMockInstance } = require('jest-create-mock-instance'); | ||
|
||
const Logger = require('../logger'); | ||
const createFakeCommand = require('./fixtures/fake-command'); | ||
const BaseHandler = require('./base-handler'); | ||
|
||
let commands, controller, inputStream, logger; | ||
|
||
beforeEach(() => { | ||
commands = [ | ||
createFakeCommand('foo', 'echo foo', 0), | ||
createFakeCommand('bar', 'echo bar', 1), | ||
]; | ||
inputStream = new stream.PassThrough(); | ||
logger = createMockInstance(Logger); | ||
controller = new BaseHandler({ logger }); | ||
}); | ||
|
||
it('returns same commands and null onFinish callback by default', () => { | ||
expect(controller.handle(commands)).toMatchObject({ commands, onFinish: null }); | ||
}); |
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