Closed AdrienLemaire closed 10 years ago
Hope you are running laika with laika --compilers coffee:coffee-script
For chai
and others to be available via laika
. You've to install them globally. (npm install -g chai
)
You didn't understand my questions ^^
Options are here Tests wouldn't have succeeded locally if I didn't specify the coffee compiler :) This is a problem with Travis, it imports laika but it doesn't install coffee-script. If coffee-script is a requirement to laika, shouldn't it be automatically installed by travis ?
For should, I was asking why laika doesn't import it automatically. But now I think it's because laika offers to run assert or should tests, so we need to choose one or the other.
coffescript is neither a requirement for laika or mocha. You need to install it globally.
On Sun, Jan 12, 2014 at 9:03 AM, Adrien Lemaire notifications@github.comwrote:
You didn't understand my questions ^^
Options are herehttps://github.com/CoinsManager/CoinsManager/blob/alpha/laika.opts Tests wouldn't have succeeded locally if I didn't specify the coffee compiler :) This is a problem with Travis, it imports laika but it doesn't install coffee-script. If coffee-script is a requirement to laika, shouldn't it be automatically installed by travis ?
For should, I was asking why laika doesn't import it automatically. But now I think it's because laika offers to run assert or should tests, so we need to choose one or the other.
— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/laika/issues/74#issuecomment-32114316 .
Arunoda Susiripala
@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda
Yeah true.. I did install coffee-script in the .travis.yml file thought. Not a bug related to laika I guess, I'll debug that more on my own. Thanks
Laika is very poorly handle custom nodejs modules. I need to build some alternative machanism for that too.
On Sun, Jan 12, 2014 at 9:10 AM, Adrien Lemaire notifications@github.comwrote:
Yeah true.. I did install coffee-script in the .travis.ymlhttps://github.com/CoinsManager/CoinsManager/blob/alpha/.travis.ymlfile thought. Not a bug related to laika I guess, I'll debug that more on my own. Thanks
— Reply to this email directly or view it on GitHubhttps://github.com/arunoda/laika/issues/74#issuecomment-32114402 .
Arunoda Susiripala
@arunoda http://twitter.com/arunoda http://gplus.to/arunodahttps://github.com/arunoda http://www.linkedin.com/in/arunoda
I finally got it. I was doing npm install coffee-script
in the .travis.yml
, while I needed to do npm install -g coffee-script
Ah this is making me insane. Now that the coffee-script issue has been resolved, I get many errors, depending on (my tests](https://github.com/CoinsManager/CoinsManager/pull/17) with the .travis.yml
conf:
ReferenceError: require is not defined
TypeError: Cannot call method 'split' of undefined
Error: Cannot find module 'should'
etc.
My file currently looks like that
If you know what's wrong, and can fix the .travis.yml
file so I get the same result as in local (issue 75 ) , I'd really appreciate. Thanks in advance
switched over to RTD, closing this issue
Just a note, that I had coffee-script working on a local build, but in order to get it working with an automatic CI, where I had to install coffee-script, I had to use --compiler coffee:coffee-script/release. I think it's related to the version of coffee-script the system has. Also, I couldn't find any mention of coffee-script in the docs!
Isn't coffeescript provided by mocha and therefore available within Laika ?
When running successfully tests in local, I see them fail in Travis with error Error: Cannot find module 'coffee-script' (cf build). Trying to update my
.travis.yml
to npm install coffee-script, but didn't get travis to work yet.Same thing about should. Shouldn't it be directly available in the tests via Chai? I had to write a $setup.coffee file to get it to work. Therefore not using Chai, not sure how to import it in the project.