pax_global_header00006660000000000000000000000064120713524520014513gustar00rootroot0000000000000052 comment=2e9bbe67cb9f86cb5cae9f9344ec707e088ae457 retape-0.0.3/000077500000000000000000000000001207135245200127735ustar00rootroot00000000000000retape-0.0.3/.travis.yml000066400000000000000000000000631207135245200151030ustar00rootroot00000000000000language: node_js node_js: - 0.4 - 0.5 - 0.6 retape-0.0.3/History.md000066400000000000000000000003271207135245200147600ustar00rootroot00000000000000# Changes ## 0.0.2 / 2013-01-02 - Fix how nested units are executed since a bug was causing to run only on test. ## 0.0.2 / 2013-01-02 - Compatibility with IE ## 0.0.1 / 2013-01-02 - Initial release retape-0.0.3/License.md000066400000000000000000000020701207135245200146760ustar00rootroot00000000000000Copyright 2013 Irakli Gozalishvili. All rights reserved. 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. retape-0.0.3/Readme.md000066400000000000000000000017201207135245200145120ustar00rootroot00000000000000# retape [![browser support](http://ci.testling.com/Gozala/retape.png)](http://ci.testling.com/Gozala/retape) [![Build Status](https://secure.travis-ci.org/Gozala/retape.png)](http://travis-ci.org/Gozala/retape) [CommonJS test][] to [tape][] adapter, allowing you to use [testling ci][] without rewriting any of your tests. In a future probably [test][] will just produce [tap][] output to be compatible with [testling ci][] out of the box. ## Usage Only thing you need to do is create adapter module that wraps your entry test module: ```js var retape = require("retape") retape(require("test/index")) // Or whatever your entry point test module is. ``` Of course you'll also need to set up your `package.json` and github repo as instructed by [testling ci][]. ## Install npm install retape [CommonJS test]:https://github.com/Gozala/test-commonjs/ [tap]:https://github.com/substack/tape [testling ci]:http://ci.testling.com/ [tap]:http://testanything.org/wiki/ retape-0.0.3/package.json000066400000000000000000000020001207135245200152510ustar00rootroot00000000000000{ "name": "retape", "id": "retape", "version": "0.0.3", "description": "CommonJS test to tape adapter", "keywords": [ "retape" ], "author": "Irakli Gozalishvili (http://jeditoolkit.com)", "homepage": "https://github.com/Gozala/retape", "repository": { "type": "git", "url": "https://github.com/Gozala/retape.git", "web": "https://github.com/Gozala/retape" }, "bugs": { "url": "http://github.com/Gozala/retape/issues/" }, "dependencies": { "tape": "~0.1.5" }, "devDependencies": { "test": "~0.6.0" }, "main": "./retape.js", "scripts": { "test": "node ./test/index.js" }, "testling" : { "files" : "test/index.js", "browsers" : { "iexplore" : [ "6.0", "7.0", "8.0", "9.0" ], "chrome" : [ "20.0" ], "firefox" : [ "10.0", "15.0" ], "safari" : [ "5.1" ], "opera" : [ "12.0" ] } }, "licenses": [ { "type": "MIT", "url": "https://github.com/Gozala/retape/License.md" } ] } retape-0.0.3/retape.js000066400000000000000000000021621207135245200146120ustar00rootroot00000000000000"use strict"; var tape = require("tape") var owns = Object.prototype.hasOwnProperty var keys = Object.keys || function(object) { var result = [] for (var key in object) { if (owns.call(object, object[key])) { result.push(key) } } } function adaptAsync(unit) { return function(assert) { unit(assert, function() { assert.end() }) } } function adaptSync(unit) { return function(assert) { unit(assert) assert.end() } } function adapt(suite, test) { test = test || tape Object.keys(suite).forEach(function(name) { // CommonJS cares only about names that start with test. if (name.indexOf("test") !== 0) return var unit = suite[name] // If unit is a function then adapt it. if (typeof(unit) === "function") { var adapted = unit.length > 1 ? adaptAsync(unit) : adaptSync(unit) test(name, adapted) } else if (unit && typeof(unit) === "object"){ test(name, function(test) { adapt(unit, function(name, unit) { test.test(name, unit) }) test.end() }) } }) } module.exports = adapt retape-0.0.3/test/000077500000000000000000000000001207135245200137525ustar00rootroot00000000000000retape-0.0.3/test/index.js000066400000000000000000000002341207135245200154160ustar00rootroot00000000000000"use strict"; exports["test fail fast"] = require("test/test/fail-fast") exports["test async"] = require("test/test/async") require("../retape")(exports)