-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup Travis and add tests #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
@@ -0,0 +1,36 @@ | |||
import { JestHook } from 'jest-watcher'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think about exporting this from jest-watcher
. Eslint has great success by exporting helpers making it a breeze to test - watch plugins (and runners) might benefit from the same approach in the long run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree!!
I feel that it is a bit too early to move it... I'll work on making this plugin configurable(key
, prompt
, search-strategy
, etc) and that should help me understand if this was the right abstraction for the tester.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sounds like a great idea
// $FlowFixMe | ||
export const getTerminalWidth = (): number => process.stdout.columns; | ||
export const getTerminalWidth = ( | ||
pipe: stream$Writable | tty$WriteStream = process.stdout, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nop, not a bug fix... It was failing in CI because columns is 0. I changed so that it can use the pipe that was passed as an argument, which means that now we can mock the number of columns.
This PR sets up Travis and add tests for each plugin. This should help a lot once this plugins become more complex