source: trip-planner-front/node_modules/performance-now/test/scripts.coffee@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.3 KB
Line 
1Bluebird = require "bluebird"
2exec = require("child_process").execSync
3{assert} = require "chai"
4
5describe "scripts/initital-value.coffee (module.uptime(), expressed in milliseconds)", ->
6 result = exec("./test/scripts/initial-value.coffee").toString().trim()
7 it "printed #{result}", ->
8 it "printed a value above 100", -> assert.isAbove result, 100
9 it "printed a value below 350", -> assert.isBelow result, 350
10
11describe "scripts/delayed-require.coffee (sum of uptime and 250 ms delay`)", ->
12 result = exec("./test/scripts/delayed-require.coffee").toString().trim()
13 it "printed #{result}", ->
14 it "printed a value above 350", -> assert.isAbove result, 350
15 it "printed a value below 600", -> assert.isBelow result, 600
16
17describe "scripts/delayed-call.coffee (sum of uptime and 250 ms delay`)", ->
18 result = exec("./test/scripts/delayed-call.coffee").toString().trim()
19 it "printed #{result}", ->
20 it "printed a value above 350", -> assert.isAbove result, 350
21 it "printed a value below 600", -> assert.isBelow result, 600
22
23describe "scripts/difference.coffee", ->
24 result = exec("./test/scripts/difference.coffee").toString().trim()
25 it "printed #{result}", ->
26 it "printed a value above 0.005", -> assert.isAbove result, 0.005
27 it "printed a value below 0.07", -> assert.isBelow result, 0.07
Note: See TracBrowser for help on using the repository browser.