-
Notifications
You must be signed in to change notification settings - Fork 8
Babel and ES6 Utilities Class #54
base: master
Are you sure you want to change the base?
Conversation
looks like the tests is actually failing, could you take a look? @seyeojumu |
CLA is valid! |
} | ||
|
||
static exists(v) { | ||
return !(typeof v == 'undefined' || v == null); |
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.
return !(v === undefined || v === null)`
(from federico)
Unit test fixed. Please take a look and merge it maybe. 😄 |
* Bumped istanbul to version 1; supports babel-node + removes unnec. error messages * Bumped test timeouts; transpiling for nodejs v0.12 seems to take a while. * Cosmetic changes to aid testing + coverage.
@@ -25,7 +25,7 @@ | |||
"master": "node_modules/.bin/babel-node server.js --master", | |||
"worker": "node_modules/.bin/babel-node server.js --worker", | |||
"redis": "redis-server", | |||
"test": "TEST=1 node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- $(find tests -name '*.test.js') --compilers js:babel-core/register", | |||
"test": "TEST=1 ./node_modules/.bin/babel-node ./node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- --compilers js:babel-core/register --timeout 5000 $(find tests -name '*.test.js') ", |
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.
as you are using babel-node
, does it necessary to put --compilers js:babel-core/register
?
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.
oh -- good point. that's probably unnec. if we verify, can take that out, and then merge
Made a couple changes based on information from here. Something to be aware of -- the tests seem to take much longer to run now; especially on v0.12. Maybe we should probably re-organize the package.json a little bit -- create a build target so that the transpiling happens only once? Anywho, LGTM +1 |
|
||
export default class Utilities { | ||
|
||
static formatMilliseconds(ms) { |
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.
@seyeojumu does it make sense to format this file so java
-like?
i think it also works if i make each method export function formatMilliseconds(ms) {}
In that case i can import only the methods i want... like...
import {formatMilliseconds, isDictionary} from './utilities'
the tests does seem taking longer than before on travis, on my computer it seems fine. do you mean we could check in the compiled javascript (from babel)? |
No description provided.