Skip to content

Instantly share code, notes, and snippets.

View awatson1978's full-sized avatar
🏠
Working from home

Abigail Watson awatson1978

🏠
Working from home
View GitHub Profile
# User for local dev
FROM app/base
RUN npm install -g orion-cli
# This forces package-catalog update. Should speed up further runs
RUN meteor show meteor-platform
@awatson1978
awatson1978 / gist:cce938ddfd5b961f86b6
Created May 21, 2015 20:42
Template.example.__helpers[" foo"]()

Note the __ underscores, the extra space before the method name, and the parantheses at the end.

Template.plantsListPage.__helpers[" hasNoContent"]()
http://swizec.com/blog/how-to-run-javascript-tests-in-chrome-on-travis/swizec/6647
@awatson1978
awatson1978 / .travis.yml
Last active July 21, 2023 13:45 — forked from zeroasterisk/.travis.yml
Nightwatch Runner for Travis (and Phantom)
language: node_js
node_js:
- "0.10"
services:
- mongodb
sudo: required
@awatson1978
awatson1978 / gist:e9fd118781e68c5e851e
Last active November 19, 2019 21:45
Nightwatch Unit Testing for Meteor

Nightwatch Unit Testing Functions for Meteor

Unit Testing Client-Side Javascript from the Client

Meteor has a fairly extensive API, and places various objects on the global scope of the browser's Javascript environment, such as Session, Template, Collection, and of course Meteor. Here is how to test methods on such objects using Nightwatch and the Selenium .execute() API.

exports.command = function(sessionVarName, expectedValue) {
  var client = this;
  this
 .execute(function(data){
@awatson1978
awatson1978 / gist:b81e3d7969d12b6bd136
Created July 12, 2015 20:15
Remove Package from Atmosphere
````
meteor admin set-unmigrated clinical:foo
````
@awatson1978
awatson1978 / gist:39cecf9ba5cd476ac85a
Last active August 29, 2015 14:27
Package.addComponet()
function addComponent(api, name, imports) {
  api.addFiles('components/' + name + '/' + name + '.html', 'client');
  api.addFiles('components/' + name + '/' + name + '.js', 'client');
  api.addFiles('components/' + name + '/' + name + '.styl', 'client');
  if(imports) {
    api.addFiles('components/' + name + '/skin.import.styl', 'client');
 api.addFiles('components/' + name + '/structure.import.styl', 'client');
let remote = DDP.connect(Meteor.settings.public.remote.url);
Meteor.connection = remote;
Accounts.connection = remote;
Meteor.users = new Mongo.Collection('users', remote);
Orders = new Mongo.Collection('orders', remote);
FlowRouter.subscriptions = function () {
this.register('workstation', Meteor.settings.remote.id);
@awatson1978
awatson1978 / gist:ec27f561ca3e88716e0d
Created November 4, 2015 05:05
Package Upgrade/Migration Logic
````js
//packages/clinical-router/lib/version_conflict_error.js
if (Package['cmather:iron-router']) {
throw new Error("\n\n\
Sorry! The cmather:iron-{x} packages were migrated to the new package system with the wrong name, and you have duplicate copies.\n\
You can see which cmather:iron-{x} packages have been installed by using this command:\n\n\
> meteor list\n\n\
Can you remove any installed cmather:iron-{x} packages like this:\
@awatson1978
awatson1978 / gist:83174af4305e18127440
Last active August 8, 2016 02:44
Adding Example Gitmodules to Cookbook
cd examples
git clone https://github.com/awatson1978/clinical-scheduling.git
git add --all .
git submodule init
git submodule update
git commit -a -m 'added submodules'
git push origin master
https://github.com/blog/2104-working-with-submodules