Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added output of "testnode examples" to README

  • Loading branch information...
commit a63dca05d172217465feb3152b1cc1526f96aff1 1 parent dba8ac1
Joel Plane joelplane authored

Showing 1 changed file with 103 additions and 0 deletions. Show diff stats Hide diff stats

  1. +103 0 README.md
103 README.md
Source Rendered
@@ -58,3 +58,106 @@ Install with npm:
58 58
59 59 More doco coming soon :)
60 60
  61 +Example Output
  62 +--------------
  63 +
  64 +(has colour, which is not shown here)
  65 +
  66 +
  67 + joel@joel3:/usr/local/lib/node/testnode$ testnode examples/passing
  68 + Loading file /usr/local/lib/node/.npm/testnode/0.1.4/package/examples/passing/basicTest.js
  69 + Loading file /usr/local/lib/node/.npm/testnode/0.1.4/package/examples/passing/basicTest2.js
  70 + Loading file /usr/local/lib/node/.npm/testnode/0.1.4/package/examples/passing/setupAndTeardown.js
  71 + Example Test Suite
  72 + Example Sub-Context
  73 + it Basic Test Example
  74 + +
  75 + 1 assertion passed
  76 + it Another Basic Test Example
  77 + +
  78 + 1 assertion passed
  79 + Example of using run() for setup and teardown
  80 + it Test run callback has been called
  81 + +
  82 + 1 assertion passed
  83 + it Test run() has been called once, followed by a test
  84 + +
  85 + 1 assertion passed
  86 + setupAndTeardown.js: a = 2
  87 + Another context
  88 + it Previous context's last run() function was called
  89 + +
  90 + 1 assertion passed
  91 +
  92 +
  93 + joel@joel3:/usr/local/lib/node/testnode$ testnode examples/failing
  94 + Loading file /usr/local/lib/node/.npm/testnode/0.1.4/package/examples/failing/asyncExample.js
  95 + Loading file /usr/local/lib/node/.npm/testnode/0.1.4/package/examples/failing/exceptionTest.js
  96 + Loading file /usr/local/lib/node/.npm/testnode/0.1.4/package/examples/failing/failingTest.js
  97 + Example Test Suite
  98 + Example Sub-Context
  99 + it Test code throws exception
  100 + 1 assertion failed
  101 +
  102 + Error: bleh
  103 + at [object Object]._testFunction (/usr/local/lib/node/.npm/testnode/0.1.4/package/examples/failing/exceptionTest.js:7:19)
  104 + at [object Object]._call (/usr/local/lib/node/.npm/testnode/0.1.4/package/test.js:56:30)
  105 + at Object.next (/usr/local/lib/node/.npm/testnode/0.1.4/package/testQueue.js:22:13)
  106 + at Object.put (/usr/local/lib/node/.npm/testnode/0.1.4/package/testQueue.js:10:11)
  107 + at Array.1 (/usr/local/lib/node/.npm/testnode/0.1.4/package/test.js:40:19)
  108 + at EventEmitter._tickCallback (node.js:170:26)
  109 +
  110 + it A Failing Test Example
  111 + x
  112 + 1 assertion failed
  113 +
  114 + assert : Expected first argument to evaluate to true
  115 + at [object Object]._testFunction (/usr/local/lib/node/.npm/testnode/0.1.4/package/examples/failing/failingTest.js:7:18)
  116 + at [object Object]._call (/usr/local/lib/node/.npm/testnode/0.1.4/package/test.js:56:30)
  117 + at Object.next (/usr/local/lib/node/.npm/testnode/0.1.4/package/testQueue.js:22:13)
  118 + at Object.put (/usr/local/lib/node/.npm/testnode/0.1.4/package/testQueue.js:10:11)
  119 + at Array.2 (/usr/local/lib/node/.npm/testnode/0.1.4/package/test.js:40:19)
  120 + at EventEmitter._tickCallback (node.js:170:26)
  121 +
  122 + A Sub-Context in asyncExample.js
  123 + it should do something 2
  124 + +++
  125 + 3 assertions passed
  126 + it should do something else
  127 + +x
  128 + 1 assertion failed
  129 +
  130 + assert : Expected first argument to evaluate to true
  131 + at [object Object]._testFunction (/usr/local/lib/node/.npm/testnode/0.1.4/package/examples/failing/asyncExample.js:30:22)
  132 + at [object Object]._call (/usr/local/lib/node/.npm/testnode/0.1.4/package/test.js:56:30)
  133 + at Object.next (/usr/local/lib/node/.npm/testnode/0.1.4/package/testQueue.js:22:13)
  134 + at [object Object].<anonymous> (/usr/local/lib/node/.npm/testnode/0.1.4/package/testQueue.js:18:13)
  135 + at [object Object].<anonymous> (events.js:81:20)
  136 + at Object._onTimeout (/usr/local/lib/node/.npm/testnode/0.1.4/package/test.js:52:16)
  137 + at Timer.callback (timers.js:83:39)
  138 +
  139 + it should do something 1
  140 + +xx
  141 + 2 assertions failed
  142 +
  143 + assert : Expected first argument to evaluate to true
  144 + at [object Object]._testFunction (/usr/local/lib/node/.npm/testnode/0.1.4/package/examples/failing/asyncExample.js:10:24)
  145 + at [object Object]._call (/usr/local/lib/node/.npm/testnode/0.1.4/package/test.js:56:30)
  146 + at Object.next (/usr/local/lib/node/.npm/testnode/0.1.4/package/testQueue.js:22:13)
  147 + at [object Object].<anonymous> (/usr/local/lib/node/.npm/testnode/0.1.4/package/testQueue.js:18:13)
  148 + at [object Object].<anonymous> (events.js:81:20)
  149 + at [object Object].done (/usr/local/lib/node/.npm/testnode/0.1.4/package/test.js:52:16)
  150 + at [object Object]._testFunction (/usr/local/lib/node/.npm/testnode/0.1.4/package/examples/failing/asyncExample.js:31:22)
  151 + at [object Object]._call (/usr/local/lib/node/.npm/testnode/0.1.4/package/test.js:56:30)
  152 +
  153 + assertEqual : Expected '123', but got 135
  154 + at [object Object]._testFunction (/usr/local/lib/node/.npm/testnode/0.1.4/package/examples/failing/asyncExample.js:11:24)
  155 + at [object Object]._call (/usr/local/lib/node/.npm/testnode/0.1.4/package/test.js:56:30)
  156 + at Object.next (/usr/local/lib/node/.npm/testnode/0.1.4/package/testQueue.js:22:13)
  157 + at [object Object].<anonymous> (/usr/local/lib/node/.npm/testnode/0.1.4/package/testQueue.js:18:13)
  158 + at [object Object].<anonymous> (events.js:81:20)
  159 + at [object Object].done (/usr/local/lib/node/.npm/testnode/0.1.4/package/test.js:52:16)
  160 + at [object Object]._testFunction (/usr/local/lib/node/.npm/testnode/0.1.4/package/examples/failing/asyncExample.js:31:22)
  161 + at [object Object]._call (/usr/local/lib/node/.npm/testnode/0.1.4/package/test.js:56:30)
  162 +
  163 +

0 comments on commit a63dca0

Please sign in to comment.
Something went wrong with that request. Please try again.