File: scripts.coffee

package info (click to toggle)
node-performance-now 2.1.0%2Bdebian-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 220 kB
  • sloc: javascript: 78; makefile: 4
file content (19 lines) | stat: -rw-r--r-- 941 bytes parent folder | download
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