Created
February 24, 2014 19:52
-
-
Save devdazed/9195710 to your computer and use it in GitHub Desktop.
There is only....
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ui: mocha-qunit | |
browsers: | |
- name:chrome | |
- version: latest | |
scripts: | |
- "http://d8rk54i4mohrb.cloudfront.net/js/reach.js" | |
server: ./server.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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