1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Bluebird = require "bluebird"
exec = require("child_process").execSync
{assert} = require "chai"
describe "scripts/initital-value.coffee (module.uptime(), expressed in milliseconds)", ->
result = parseFloat exec("./test/scripts/initial-value.coffee").toString().trim()
it "printed #{result}", ->
it "printed a value above 80", -> assert.isAbove result, 80
it "printed a value below 350", -> assert.isBelow result, 350
describe "scripts/delayed-require.coffee (sum of uptime and 250 ms delay`)", ->
result = parseFloat exec("./test/scripts/delayed-require.coffee").toString().trim()
it "printed #{result}", ->
it "printed a value above 340", -> assert.isAbove result, 340
describe "scripts/delayed-call.coffee (sum of uptime and 250 ms delay`)", ->
result = parseFloat exec("./test/scripts/delayed-call.coffee").toString().trim()
it "printed #{result}", ->
it "printed a value above 340", -> assert.isAbove result, 340
|