Skip to content
This repository has been archived by the owner on Sep 21, 2018. It is now read-only.

Babel and ES6 Utilities Class #54

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Babel and ES6 Utilities Class #54

wants to merge 14 commits into from

Conversation

nickwph
Copy link
Contributor

@nickwph nickwph commented Mar 18, 2016

No description provided.

@nickwph nickwph changed the title Babel and ES6 Class Babel and ES6 Utilities Class Mar 18, 2016
@nickwph
Copy link
Contributor Author

nickwph commented Mar 18, 2016

looks like the tests is actually failing, could you take a look? @seyeojumu
https://travis-ci.org/yahoo/guerilla/jobs/116933560

@yahoocla
Copy link

CLA is valid!

}

static exists(v) {
return !(typeof v == 'undefined' || v == null);
Copy link
Contributor Author

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)

@nickwph
Copy link
Contributor Author

nickwph commented Mar 21, 2016

Unit test fixed. Please take a look and merge it maybe. 😄

@nickwph nickwph mentioned this pull request Mar 21, 2016
* 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') ",
Copy link
Contributor Author

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?

Copy link
Contributor

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

@seyeojumu
Copy link
Contributor

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) {
Copy link
Contributor Author

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'

@nickwph
Copy link
Contributor Author

nickwph commented Mar 22, 2016

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)?
in webstorm *-compiled.js.map and *-compiled.js would be generated if i set up a watcher.
but i felt like it is too webstorm-specific and i just ignored them.

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

Successfully merging this pull request may close these issues.

3 participants