Skip to content

Instantly share code, notes, and snippets.

@m-allanson
m-allanson / gist:4235225
Created December 7, 2012 18:20
Broken noise-box casperJS script
var casper = require('casper').create();
var casper2 = require('casper').create();
var roomName = 'caspersroom';
var audiofile = '';
casper.start('http://localhost:7001/', function() {
this.test.assertTitle('NoiseBox', 'NoiseBox title is ok');
this.test.assertExists('form[action="/host/"]', 'The form to create a new host exists');
this.fill('form[action="/host/"]', {
id: roomName
@m-allanson
m-allanson / gist:3084527
Created July 10, 2012 16:37
The right way to check if a variable is undefined in javascript
if (typeof someVar === 'undefined') {
// it's not defined
}