Comments (12)
Okay you get a screenshot of the console?
Also is it possible to share the test code ?
from laika.
Here you go. I attached a screenshot with the console and the code. Its really simple tests that I am trying to setup.
If make the test run on the server (ie replace client with server), the test runs.
I installed PhatomJS 1.9.1 through homebrew.
from laika.
Hmm, pretty weird.
I updated phantomjs and it works correctly.
Can ensure do you have laika version 0.2.2
? (laika -v
)
If not upgrade it.
Try to clone https://github.com/arunoda/laika and run tests on the locally.
you can do with npm test
Lets see if it gives an error?
On Mon, Jul 1, 2013 at 7:32 AM, thejinx0r [email protected] wrote:
[image: screen shot 2013-06-30 at 9 57 55 pm]https://f.cloud.github.com/assets/323436/728194/cacea36a-e1f1-11e2-9489-8e09d21740a6.png
Here you go. I attached a screenshot with the console and the code. Its
really simple tests that I am trying to setup.If make the test run on the server (ie replace client with server), the
test runs.I installed PhatomJS 1.9.1 through homebrew.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-20260108
.
Arunoda Susiripala
@arunoda http://twitter.com/arunoda
http://gplus.to/arunodahttps://github.com/arunoda
http://www.linkedin.com/in/arunoda
from laika.
I was running the latest laika version.
When I cloned the repo and ran the test, this is the error I got.
[email protected] test /Users/ericyen/git/laika
node_modules/.bin/mocha -u tdd -R spec -t 5000 --recursive testsh: node_modules/.bin/mocha: No such file or directory
npm ERR! weird error 127
npm ERR! not ok code 0
I also made sure to reinstall mocha, but I still got the same error.
from laika.
You've to first install dependancies with npm install
Then try.
On Mon, Jul 1, 2013 at 8:13 AM, thejinx0r [email protected] wrote:
I was running the latest laika version.
When I cloned the repo and ran the test, this is the error I got.
[email protected] test /Users/ericyen/git/laika
node_modules/.bin/mocha -u tdd -R spec -t 5000 --recursive testsh: node_modules/.bin/mocha: No such file or directory
npm ERR! weird error 127
npm ERR! not ok code 0—
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-20260931
.
Arunoda Susiripala
@arunoda http://twitter.com/arunoda
http://gplus.to/arunodahttps://github.com/arunoda
http://www.linkedin.com/in/arunoda
from laika.
I did that,
And all the tests are passing now.
from laika.
Hmm. I wonder what cause the issue.
Can you try evalSync instead sync -
http://arunoda.github.io/laika/syntax-suger.html ?
On Mon, Jul 1, 2013 at 8:22 AM, thejinx0r [email protected] wrote:
I did that,
And all the tests are passing now.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-20261116
.
Arunoda Susiripala
@arunoda http://twitter.com/arunoda
http://gplus.to/arunodahttps://github.com/arunoda
http://www.linkedin.com/in/arunoda
from laika.
I tried evalSync instead. Same error.
I wrapped the code in evalSync in a setTimeout. Same error.
I replaced client.evalSync with server.evalSync. Same error. ( replacing client with server was previously working)
I replaced server.evalSync with server.eval. it works again.
(Yes, I made sure to comment out the client/server.once call after he evalSync calls)
from laika.
Problem partially solved.
I have some server code that loads a fair amount of data into the database.
When I comment out that line of code, it works.
But obviously, I don't want to have to comment out my code to run the test.
So, is there any way for me, from within my code to identify if it is running the laika tests or not?
from laika.
I had the same problem with some code in a Meteor.startup() block that preloaded a bunch of data. I added an environment variable to my Laika run, checking for the environment variable in the startup script, and not running the load script if the environment variable was true.
Command
$ TEST=1 laika
Code
Meteor.startup(function () {
if ( !process.env.TEST ) {
loadData(); // or whatever
}
});
The downside of course is that you have to create any data you want preloaded in the test. I'd be interested in some way to load data before a test, a la Django fixtures.
from laika.
Perfect.
I will do that.
Since it's pretty much solved, and I'm not a heavy github user, I have a github etiquette question.
should I close this issue? or leave it opened as a feature request?
from laika.
Fixtures is a features we should badly needed. You can close the issue. We'll open another issue for the fixtures and continue the discussion on it.
from laika.
Related Issues (20)
- Can you add a publish-subscribe test example using laika
- error: File not found: client/meteor-suite-client.js
- Adding Client-side Helpers Within PhantomJS HOT 1
- Only Partial Mocha Support? HOT 1
- Save output of mocha reporter to file
- Fiber error on startup
- Codeship Phantom error
- Laika destroys dates when passed using eval HOT 1
- Cannot file module .meteor/release/[email protected] HOT 11
- How to pass start parameters to Laika? IP Binding Issues HOT 1
- Can't run Hello World sample on Nitrous with Meteor 0.9.2.2 HOT 4
- Delay before running tests HOT 2
- Integrate with Velocity HOT 1
- Laika doesn't work with velocity tests. HOT 1
- Prevent installing with mrt HOT 3
- Hangs on loading phantomjs... HOT 5
- Getting error during installation . HOT 6
- passing --settings
- console logging
- laika couldn't run in meteor app HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laika.