Skip to content

Instantly share code, notes, and snippets.

@devdazed
Created February 24, 2014 19:52
Show Gist options
  • Save devdazed/9195710 to your computer and use it in GitHub Desktop.
Save devdazed/9195710 to your computer and use it in GitHub Desktop.
There is only....
ui: mocha-qunit
browsers:
- name:chrome
- version: latest
scripts:
- "http://d8rk54i4mohrb.cloudfront.net/js/reach.js"
server: ./server.js
var express = require('express');
var app = express();
app.get('/event', function(req, res){
console.log(req);
res.send(true);
});
app.listen(process.env.ZUUL_PORT || 3000);
var assert = require('assert');
// our test file needs to know where to find the module relative to itself
//var send = require('./my-module');
// general category for the tests that follow
suite('api');
test('should respond to api request', function(done) {
var opts = {
engaged_time: 0,
total_time: 0
};
SPR.API.track(window.location.host, '/event', opts, function(response){
assert(response, true);
done();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment