Permalink
Browse files

changes to get the tap tests running in testling

  • Loading branch information...
1 parent 80879b8 commit 65e8ea34f4af661dd3ee677c6c7d776d73e8f688 @substack committed May 4, 2012
Showing with 30 additions and 2 deletions.
  1. +6 −1 index.js
  2. +4 −1 test/args.js
  3. +20 −0 testling/test.sh
View
@@ -1,6 +1,11 @@
var traverse = require('traverse');
var EventEmitter = require('events').EventEmitter;
-var stream = require('stream');
+
+var stream = function () {};
+try {
+ stream = require('stream');
+} catch (e) {};
+
var json = typeof JSON === 'object' ? JSON : require('jsonify');
var exports = module.exports = function (wrapper) {
View
@@ -1,4 +1,7 @@
-var test = require('tap').test;
+var test;
+try { test = require('tap').test }
+catch (e) { test = require('testling') }
+
var protocol = require('../');
function argv () { return arguments }
View
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+echo -n "username: "
+read user
+
+browsers=""
+if test -n "$2"; then
+ browsers="browsers=$2"
+fi
+
+function testFile {
+ tar -cf- index.js "$1" node_modules/traverse/index.js \
+ | curl -u "$user" -sSNT- "http://testling.com/?$browsers&main=$1"
+}
+
+if test -f "$1"; then
+ testFile "$1"
+else
+ echo not
+fi

0 comments on commit 65e8ea3

Please sign in to comment.