Permalink
Browse files

update the readme to run local tests

  • Loading branch information...
substack committed Apr 23, 2013
1 parent 06510d9 commit d542b27ff48229ebcc9a0d45fc96a51bfde45e83
Showing with 40 additions and 15 deletions.
  1. +18 −0 LICENSE
  2. +22 −15 readme.markdown
View
18 LICENSE
@@ -0,0 +1,18 @@
+This software is released under the MIT license:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -8,30 +8,33 @@ write a test:
``` js
var test = require('tape');
-var myCode = require('../my_code.js');
-
-test('make sure my code works', function (t) {
- t.plan(2);
- t.equal(myCode.beep(5), 555);
-
- myCode.boop(333, function (n) {
- t.equal(n, 3);
- });
+
+test('beep boop', function (t) {
+ t.plan(2);
+ t.equal(1+1, 2);
+ t.ok(true);
});
```
-configure your package.json and set up a web hook:
+run your test in a local headless browser:
```
-$ testling init
-```
+$ browserify example/test.js | testling
-run your tests locally:
+TAP version 13
+# beep boop
+ok 1 should be equal
+ok 2 (unnamed assert)
-```
-$ testling
+1..2
+# tests 2
+# pass 2
+
+# ok
```
+with an exit code of 0 for successes and non-zero for failures like a good unix
+citizen
# install
@@ -41,4 +44,8 @@ With [npm](http://npmjs.org) just do:
npm install -g testling
```
+# license
+
+MIT
+
![attack of the testlings!](http://substack.net/images/browsers/war_of_the_browsers.png)

0 comments on commit d542b27

Please sign in to comment.