Skip to content
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

Merged
merged 4 commits into from
Jul 3, 2018
Merged

Setup Travis and add tests #12

merged 4 commits into from
Jul 3, 2018

Conversation

rogeliog
Copy link
Member

@rogeliog rogeliog commented Jul 3, 2018

This PR sets up Travis and add tests for each plugin. This should help a lot once this plugins become more complex

@rogeliog rogeliog requested a review from SimenB July 3, 2018 18:29
Copy link
Member

@SimenB SimenB left a 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';
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug fix?

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants