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

Modernize the development environment #16

Merged
merged 7 commits into from
Nov 15, 2018
Merged

Conversation

slifty
Copy link
Owner

@slifty slifty commented Nov 15, 2018

This PR resolves a whole slew of little nits with the code base.

Travis should now be working properly and the two testing packages have been updated to the most recent versions. This actually revealed some issues with the tests themselves as well as one issue with the code base (the random stream had an interval that never got closed)

Also switching over to use yarn in travis, and removes the setting of a specific node version from the travis config.

This touches on some of the items in #15 but does not resolve it completely.

This must have been a relic from long ago because it sure doesn't seem
used or useful at this point.
Mocah and Should are only used for testing purposes and absolutely do
not belong as a core dependency.

Issue #15 Modernize development environment
I honestly don't know when this got removed, but, that's why Travis has
been breaking this whole time I bet.

Issue #15 Modernize development environment
Travis might as well test on 11.0.1

Issue #15 Modernize development environment
@slifty slifty force-pushed the 15-modernize-dev-environment branch from de958fe to 1479ed6 Compare November 15, 2018 20:34
The project was using a very old version of Mocah and should packages.
This brings them up to the current stable versions of each.  This
actually exposed a mistake in the tests as written, which forgot to
properly close the Opened Captions server before declaring the tests
over in some cases.

The tests still have an issue, which also exposes a mistake that will
need to be fixed in a separate commit.

Issue #15 Modernize development environment
Opened Captions has a close method which, in theory, should stop its
operations.  It turns out it actually didn't, and in the case of the
random stream the interval kept going even after a close command was
issued.

This fixes this oversight, and also means that the unit tests properly
end.  The reason this got noticed is that about a year ago Mocha decided
to no longer automatically terminate the test process.  You can read
more about that https://boneskull.com/mocha-v4-nears-release/#mochawontforceexit
Another exposed mistake thanks to Mocha's change to process killing
(I'm glad they made that change to be honest...)

The tests which created a SocketIO client to test opened captions were
passing, and then failing because after they ended the opened captions
server closed but the client was not disconnected first.  This change
disconnects the client before turning off the server.
@slifty slifty force-pushed the 15-modernize-dev-environment branch from 1479ed6 to ca24a85 Compare November 15, 2018 20:39
@slifty slifty merged commit fdbf0a2 into master Nov 15, 2018
@slifty slifty deleted the 15-modernize-dev-environment branch November 15, 2018 20:50
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.

1 participant