-
Notifications
You must be signed in to change notification settings - Fork 486
Native Flow, use Jest #767
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
Conversation
Would much appreciate a code review if y'all can spare the time! This is a big change, but has mainly accomplished:
|
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.
Overall an improvement. I had a few minor questions but nothing that is preventing you from going forward with this.
__tests__/bin-readme.js
Outdated
}); | ||
} | ||
|
||
var UPDATE = !!process.env.UPDATE; |
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.
Do we still need this?
We (I) can change this in a follow up if it works now. I don't want to make this PR any larger.
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.
👍 removed
__tests__/lib/merge_config.js
Outdated
|
||
test('bad config', function(t) { | ||
test('bad config', function(done) { |
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.
FYI, Jest also supports using async functions.
package.json
Outdated
"doc": "./bin/documentation.js build lib/index.js -f md --access=public > docs/NODE_API.md", | ||
"changelog": "standard-changelog -i CHANGELOG.md -w", | ||
"self-lint": "node ./bin/documentation.js lint", | ||
"test": "eslint lib && are-we-flow-yet lib && flow check && npm run self-lint && npm run test-tap", | ||
"test-tap": "tap -t 120 --coverage --nyc-arg=--cache test/*.js test/lib test/streams" | ||
"test": "eslint src && are-we-flow-yet src && flow check && npm run self-lint && jest --runInBand" |
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.
Do we really need --runInBand
? That slows things down a bit
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.
--runInBand
makes tests way more reliable and faster on CircleCI, but slower locally. I'd love to find a way to only enable it in the CircleCI environment, but haven't found one yet.
src/serve/server.js
Outdated
@@ -7,7 +7,7 @@ var http = require('http'), | |||
mime = require('mime'), | |||
pify = require('pify'), | |||
EventEmitter = require('events').EventEmitter, | |||
liveReload = require('tiny-lr'), | |||
// liveReload = require('tiny-lr'), |
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.
?
src/serve/server.js
Outdated
this._http = http.createServer(this.handler.bind(this)); | ||
|
||
return Promise.all([ | ||
pify(this._lr.listen.bind(this._lr))(35729), | ||
// this._lr && pify(this._lr.listen.bind(this._lr))(35729), |
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.
?
src/serve/server.js
Outdated
@@ -28,17 +28,19 @@ declare type ServerFile = { | |||
*/ | |||
class Server extends EventEmitter { | |||
/* :: _lr: Object; */ |
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.
Can this use non comment syntax now?
.eslintrc
Outdated
@@ -20,7 +20,7 @@ | |||
"no-throw-literal": 2, | |||
"no-self-compare": 2, | |||
"no-void": 2, | |||
"no-unused-vars": 2, | |||
"no-unused-vars": 1, |
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.
😿
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.
eslint was, for some reason, incorrectly flagging variables as unused, but trying it today.. it works! so back to 2
.
__tests__/bin.js
Outdated
@@ -1,4 +1,4 @@ | |||
'use strict'; | |||
/* global jasmine */ |
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.
?
declarations/comment.js
Outdated
@@ -45,6 +42,11 @@ type SourceFile = { | |||
file: string | |||
}; | |||
|
|||
// type InputsConfig = { |
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.
?
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.
👍 Removed
Changes Unknown when pulling 6ef60e0 on native into ** on master**. |
Thanks for the review, Erik! |
Changes Unknown when pulling ad8dc3e on native into ** on master**. |
Changes Unknown when pulling 3a91eec on native into ** on master**. |
Changes Unknown when pulling 6adabd5 on native into ** on master**. |
Changes Unknown when pulling 9b1c41b on native into ** on master**. |
Uh oh!
There was an error while loading. Please reload this page.