Skip to content

Instantly share code, notes, and snippets.

@jakelacey2012
Last active October 21, 2016 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakelacey2012/b5ca6a198917fe6347b1d2f570680f75 to your computer and use it in GitHub Desktop.
Save jakelacey2012/b5ca6a198917fe6347b1d2f570680f75 to your computer and use it in GitHub Desktop.
// const SLIMER_SCRIPT = '/home/jlacey/Documents/workspace/optiq/optiq/packages/zombie/server/slimer-script.js';
const SLIMER_SCRIPT = 'server/slimer-script.js';
function startZombie(done) {
const slimerProcess = childProcess.execFile(
Slimer.path, [Assets.absoluteFilePath( SLIMER_SCRIPT )],
function (err, stdout, stderr) {
console.log('\n--------------------------------');
console.log(`----- RUNNING Client TESTS -----`);
console.log('--------------------------------\n');
/**
* Here we need to get the count from the client tests.
*/
// console.log(err, stdout, stderr);
console.log(stderr);
console.log(stdout);
}
);
/**
npm i -g slimerjs
/home/jlacey/.nvm/versions/node/v6.3.0/bin/slimerjs server/slimer-script.js ... this will get us our title....
(╯°□°)╯︵ ┻━┻ jlacey@pc-jlacey-01:~/Documents/workspace/optiq/optiq(play/travis)$ /home/jlacey/.nvm/versions/node/v6.3.0/bin/slimerjs packages/zombie/server/slimer-script.js
Astronomer settings not found in Meteor.settings, skipping setup.
something
✓ should work like this
✓ should fail like this
2 passing (24ms)
The title of the page is: Optiq
meteor test --driver-package centiq:zombie --settings config/settings.dev-jlacey.json --port 3300
//https://github.com/DispatchMe/meteor-mocha-phantomjs/blob/master/server.js#L58 -- remove line and check browser
// meteor test --once --driver-package=dispatch:practicalmeteor:mocha --port 3400 --settings config/settings.dev-jlacey.json
// dispatch:practicalmeteor:mocha
// practicalmeteor:chai
// __test__ root dir - with Meteor.isClient | isServer
// running tests work fine on server -- client errors out with https://gist.github.com/jakelacey2012/77fc06b44f3abe32389b51edf6674fc6
// http://joseconstela.com/blog/continuous-integration-with-meteorjs-and-travis/
meteor add dispatch:mocha-phantomjs
meteor test-packages --driver-package practicalmeteor:mocha --port 4096 --settings config/settings.dev-jlacey.json app-astronomer
works better!
meteor test-packages --driver-package practicalmeteor:mocha-console-runner --port 4096 --settings config/settings.dev-jlacey.json app-astronomer
or spacejam
//Adding this...
FlowRouter.route('/', {
name: 'hack route for tests',
action() {},
});
FlowRouter.route('/local', {
name: 'hack route for tests',
action() {},
});
// at the top of the file fixes the errors on the running meteor test-packages
Package.describe({
name: 'jwltest',
version: '0.0.1',
// Brief, one-line summary of the package.
summary: '',
// URL to the Git repository containing the source code for this package.
git: '',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting documentation, set this field to null.
documentation: 'README.md'
});
Package.onUse(function(api) {
api.versionsFrom('1.3.5.1');
api.use('ecmascript');
api.mainModule('jwltest.js');
});
Package.onTest(function(api) {
api.use('ecmascript');
api.use('tinytest');
api.use('jwltest');
// testing mocha
api.use('practicalmeteor:mocha');
api.use('practicalmeteor:chai');
api.mainModule('jwltest-tests.js');
});
/**
* example test
*/
/**
* Small description of tests.
* These test will need to be moved
*/
describe('App Astronomer', function() {
describe('Meteor context', function () {
it('FlowRouter should not be null', function () {
expect(1).to.equal(1);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment