Created
February 24, 2014 19:52
Revisions
-
devdazed created this gist
Feb 24, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ 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(); }); });