Closed cramhead closed 10 years ago
Hey
Have you tried to run the example app? See if that works as it will tell you if it's a project problem or libraries issue
One problem I’ve consistently had is
meteor-rtd-example-project marc$ git submodule update Cloning into 'test/rtd'... Permission denied (publickey). fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists. Clone of 'git@github.com:xolvio/rtd.git' into submodule path 'test/rtd’ failed
Previously, I’ve worked around this by replacing the submodule url with https://github.com/xolvio/rtd.git, but that doesn’t seem to be working right now. Same error as the above.
Marc d'Entremont marc@sqwrl.com
On Nov 14, 2013, at 2:37 PM, xolv.io notifications@github.com wrote:
Hey
Have you tried to run the example app? See if that works as it will tell you if it's a project problem or libraries issue
— Reply to this email directly or view it on GitHub.
Are you signed in to github with your correct ssh keys in your account?
The cloning of the submodule worked correctly after I added a key. That’s awesome. Thanks
I did notice the following message while npm was installing all the parts, but it didn’t seem to result in any problem.
phantomjs@1.9.2-2 install /Users/marc/Projects/METEOR/meteor-rtd-example-project/test/rtd/node_modules/karma-phantomjs-launcher/node_modules/phantomjs node install.js
Looks like an npm install -g
; unable to check for already installed version.
Download already available at /var/folders/3m/lg8011md0x91jlr21p37r7q00000gq/T/phantomjs/phantomjs-1.9.2-macosx.zip
Extracting zip contents
Renaming extracted folder /var/folders/3m/lg8011md0x91jlr21p37r7q00000gq/T/phantomjs/phantomjs-1.9.2-macosx.zip-extract-1384475091667/phantomjs-1.9.2-macosx -> /Users/marc/Projects/METEOR/meteor-rtd-example-project/test/rtd/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /Users/marc/Projects/METEOR/meteor-rtd-example-project/test/rtd/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs
Marc d'Entremont marc@sqwrl.com
On Nov 14, 2013, at 3:58 PM, xolv.io notifications@github.com wrote:
Are you signed in to github correctly with the keys in your account?
— Reply to this email directly or view it on GitHub.
Great! So did the example project work for you?
Yes, it worked in the test project. So I went to my project and wiped out build and test then Oddly, the script doesn’t pop a karma.conf.js file into the rtd folder, so I copied the one from the meteor-rtf-example-project.
After coping the rtd.conf.js to the test folder and modifying the jshint settings and running I get the following message, but the app works fine when I got the app folder and run meteor run
Running "jshint:test" (jshint) task
1 file lint free.
Running "bgShell:karmaRun" (bgShell) task
Error: Command failed: Fatal error: Command failed:
Marc d'Entremont marc@sqwrl.com
On Nov 14, 2013, at 5:12 PM, xolv.io notifications@github.com wrote:
So did the example project work for you?
You need to stub your code, things like CollectionFS need a stub. Have a look at how meteor-stubs.js works
Cool.
I started putting together a stub. I’m expecting all I should need to do is to put in test/rtd/lib and rerun. I’m expecting even a partial stub, i.e. not all functions and properties stubbed out should work. Right?
So far my stub is: var CollectionFS;
(function() { "use strict";
var emptyFunction = function() {};
CollectionFS = {
storeFiles: emptyFunction,
retrieveBlob: emptyFunction,
retrieveFile: emptyFunction,
acceptsDropsOn: emptyFunction
};
})();
When I rerun I have the same error, i.e. ReferenceError: Can't find variable: CollectionFS
Marc d'Entremont marc@sqwrl.com
On Nov 14, 2013, at 6:05 PM, xolv.io notifications@github.com wrote:
You need to stub your code, things like CollectionFS need a stub. Have a look at how meteor-stubs.js works
— Reply to this email directly or view it on GitHub.
you can put it under unit/stubs.js also in your code so you can check it in
the stub should just be enough to let it load. that's all that's needed. the rest you can do with spies
run a console.log from your stub to see if it's being loaded
The stub worked and the console.log tip was very handy. Thanks
After that I added Template.stubs and the list of errors quickly dropped as they were added. The only error remaining is below. I figured that this could be a scenario where a stub was expected. I create one, analogous to the collectionFS stub, but it’s never called. The profileController is an iron-router controller set up as so profileController = App.Sqwrl.applicationController.extend({ … });
PhantomJS 1.9.2 (Mac OS X): Executed 0 of 0 SUCCESS (0 secs / 0 secs) LOG: 'new CollectionFS stub' PhantomJS 1.9.2 (Mac OS X): Executed 0 of 0 SUCCESS (0 secs / 0 secs) PhantomJS 1.9.2 (Mac OS X) ERROR TypeError: 'undefined' is not an object (evaluating 'profileController') PhantomJS 1.9.2 (Mac OS X) ERROR TypeError: 'undefined' is not an object (evaluating 'profileController') at /Users/marc/Projects/METEOR/Sqwrl/app/client/views/profile/profile.js:6 PhantomJS 1.9.2 (Mac OS X): Executed 0 of 0 ERROR (0 secs / 0 secs) PhantomJS 1.9.2 (Mac OS X) LOG: LOG 'new CollectionFS stub'PhantomJS 1.9.2 (Mac OS X) ERROR TypeError: 'undefined' is not an object (evaluating 'profileController') PhantomJS 1.9.2 (Mac OS X) ERROR TypeError: 'undefined' is not an object (evaluating 'profileController') at /Users/marc/Projects/METEOR/Sqwrl/app/client/views/profile/profile.js:6 PhantomJS 1.9.2 (Mac OS X): Executed 0 of 0 ERROR (0 secs / 0 secs) PhantomJS 1.9.2 (Mac OS X) ERROR TypeError: 'undefined' is not an object (evaluating 'profileController') PhantomJS 1.9.2 (Mac OS X): Executed 0 of 0 ERROR (1.036 secs / 0 secs) PhantomJS 1.9.2 (Mac OS X): Executed 0 of 0 ERROR (1.036 secs / 0 secs) PhantomJS 1.9.2 (Mac OS X): Executed 0 of 0 ERROR (1.036 secs / 0 secs)
Error: Command failed: Fatal error: Command failed:
Marc d'Entremont marc@sqwrl.com
On Nov 14, 2013, at 6:39 PM, xolv.io notifications@github.com wrote:
run a console.log from your stub to see if it's being loaded
— Reply to this email directly or view it on GitHub.
Difficult to help here without seeing the code. But the premise is correct, that you want to make sure nothing that gets accessed on load remains undefined. Once loaded, you're free to use spying etc.
Closing unless you'd like to continue.
Sorry, I should have reported. The error turned out to be that there were no tests. Once I added one everything was good.
On Tue, Dec 10, 2013 at 10:52 PM, xolv.io notifications@github.com wrote:
Closed #98 https://github.com/xolvio/rtd/issues/98.
— Reply to this email directly or view it on GitHubhttps://github.com/xolvio/rtd/issues/98 .
So the http://xolvio.github.io/rtd/ suggests $ npm i -g karma@0.8.6 phantomjs@1.9.0-6 istanbul@0.1.39 grunt-cli selenium-webdriver jasmine-node
Karma-chrome-launcher install PhantomJS 1.9.2 I'm expecting that's why I'm getting the following error.
Running "bgShell:karmaRun" (bgShell) task [D] Task source: /Users/marc/Projects/METEOR/Sqwrl/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee
Is there a work around that you think of?
Thanks, Marc