Index: imaps-frontend/node_modules/performance-now/test/mocha.opts
===================================================================
--- imaps-frontend/node_modules/performance-now/test/mocha.opts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/performance-now/test/mocha.opts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,3 @@
+--require coffee-script/register
+--compilers coffee:coffee-script/register
+--reporter spec
Index: imaps-frontend/node_modules/performance-now/test/performance-now.coffee
===================================================================
--- imaps-frontend/node_modules/performance-now/test/performance-now.coffee	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/performance-now/test/performance-now.coffee	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,43 @@
+chai = require "chai"
+chai.use(require "chai-increasing")
+{assert,expect} = chai
+Bluebird = require "bluebird"
+
+now = require "../"
+
+getUptime = -> process.uptime() * 1e3
+
+describe "now", ->
+  it "reported time differs at most 1ms from a freshly reported uptime", ->
+    assert.isAtMost Math.abs(now()-getUptime()), 1
+
+  it "two subsequent calls return an increasing number", ->
+    assert.isBelow now(), now()
+
+  it "has less than 10 microseconds overhead", ->
+    assert.isBelow Math.abs(now() - now()), 0.010
+
+  it "can be called 1 million times in under 1 second (averaging under 1 microsecond per call)", ->
+    @timeout 1000
+    now() for [0...1e6]
+    undefined
+
+  it "for 10,000 numbers, number n is never bigger than number n-1", ->
+    stamps = (now() for [1...10000])
+    expect(stamps).to.be.increasing
+
+  it "shows that at least 0.2 ms has passed after a timeout of 1 ms", ->
+    earlier = now()
+    Bluebird.resolve().delay(1).then -> assert.isAbove (now()-earlier), 0.2
+
+  it "shows that at most 3 ms has passed after a timeout of 1 ms", ->
+    earlier = now()
+    Bluebird.resolve().delay(1).then -> assert.isBelow (now()-earlier), 3
+
+  it "shows that at least 190ms ms has passed after a timeout of 200ms", ->
+    earlier = now()
+    Bluebird.resolve().delay(200).then -> assert.isAbove (now()-earlier), 190
+
+  it "shows that at most 220 ms has passed after a timeout of 200ms", ->
+    earlier = now()
+    Bluebird.resolve().delay(200).then -> assert.isBelow (now()-earlier), 220
Index: imaps-frontend/node_modules/performance-now/test/scripts.coffee
===================================================================
--- imaps-frontend/node_modules/performance-now/test/scripts.coffee	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/performance-now/test/scripts.coffee	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,27 @@
+Bluebird = require "bluebird"
+exec = require("child_process").execSync
+{assert} = require "chai"
+
+describe "scripts/initital-value.coffee (module.uptime(), expressed in milliseconds)", ->
+  result = exec("./test/scripts/initial-value.coffee").toString().trim()
+  it "printed #{result}", ->
+  it "printed a value above 100", -> assert.isAbove result, 100
+  it "printed a value below 350", -> assert.isBelow result, 350
+
+describe "scripts/delayed-require.coffee (sum of uptime and 250 ms delay`)", ->
+  result = exec("./test/scripts/delayed-require.coffee").toString().trim()
+  it "printed #{result}", ->
+  it "printed a value above 350", -> assert.isAbove result, 350
+  it "printed a value below 600", -> assert.isBelow result, 600
+
+describe "scripts/delayed-call.coffee (sum of uptime and 250 ms delay`)", ->
+  result = exec("./test/scripts/delayed-call.coffee").toString().trim()
+  it "printed #{result}", ->
+  it "printed a value above 350", -> assert.isAbove result, 350
+  it "printed a value below 600", -> assert.isBelow result, 600
+
+describe "scripts/difference.coffee", ->
+  result = exec("./test/scripts/difference.coffee").toString().trim()
+  it "printed #{result}", ->
+  it "printed a value above 0.005", -> assert.isAbove result, 0.005
+  it "printed a value below 0.07", -> assert.isBelow result, 0.07
Index: imaps-frontend/node_modules/performance-now/test/scripts/delayed-call.coffee
===================================================================
--- imaps-frontend/node_modules/performance-now/test/scripts/delayed-call.coffee	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/performance-now/test/scripts/delayed-call.coffee	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,11 @@
+#!/usr/bin/env ./node_modules/.bin/coffee
+
+###
+Expected output is a number above 350 and below 600.
+The time reported is relative to the time the node.js process was started
+this is approximately at `(Date.now() process.uptime() * 1000)`
+###
+
+delay = require "call-delayed"
+now = require "../../lib/performance-now"
+delay 250, -> console.log now().toFixed 3
Index: imaps-frontend/node_modules/performance-now/test/scripts/delayed-require.coffee
===================================================================
--- imaps-frontend/node_modules/performance-now/test/scripts/delayed-require.coffee	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/performance-now/test/scripts/delayed-require.coffee	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,12 @@
+#!/usr/bin/env ./node_modules/.bin/coffee
+
+###
+Expected output is a number above 350 and below 600.
+The time reported is relative to the time the node.js process was started
+this is approximately at `(Date.now() process.uptime() * 1000)`
+###
+
+delay = require "call-delayed"
+delay 250, ->
+  now = require "../../lib/performance-now"
+  console.log now().toFixed 3
Index: imaps-frontend/node_modules/performance-now/test/scripts/difference.coffee
===================================================================
--- imaps-frontend/node_modules/performance-now/test/scripts/difference.coffee	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/performance-now/test/scripts/difference.coffee	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,6 @@
+#!/usr/bin/env ./node_modules/.bin/coffee
+
+# Expected output is above 0.005 and below 0.07.
+
+now = require('../../lib/performance-now')
+console.log -(now() - now()).toFixed 3
Index: imaps-frontend/node_modules/performance-now/test/scripts/initial-value.coffee
===================================================================
--- imaps-frontend/node_modules/performance-now/test/scripts/initial-value.coffee	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/performance-now/test/scripts/initial-value.coffee	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,10 @@
+#!/usr/bin/env ./node_modules/.bin/coffee
+
+###
+Expected output is a number above 100 and below 350.
+The time reported is relative to the time the node.js process was started
+this is approximately at `(Date.now() process.uptime() * 1000)`
+###
+
+now = require '../../lib/performance-now'
+console.log now().toFixed 3
