From 15bbf7f10c58f5da64778bf7626081c762ed3925 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Wed, 5 Jul 2017 17:57:28 +0200 Subject: [PATCH] introduce TapWrap --- package-lock.json | 311 ++++++++++++++++++++++++++++++++ package.json | 2 +- ts/index.ts | 9 +- ts/tapbundle.classes.tap.ts | 2 +- ts/tapbundle.classes.tapwrap.ts | 14 ++ yarn.lock | 71 ++++++-- 6 files changed, 384 insertions(+), 25 deletions(-) create mode 100644 package-lock.json create mode 100644 ts/tapbundle.classes.tapwrap.ts diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..1329fb4 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,311 @@ +{ + "name": "tapbundle", + "version": "1.0.14", + "lockfileVersion": 1, + "dependencies": { + "early": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/early/-/early-2.1.1.tgz", + "integrity": "sha1-hB4jJU6l3FTYr67ugvWrZcAO4jw=", + "dependencies": { + "beautycolor": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/beautycolor/-/beautycolor-1.0.7.tgz", + "integrity": "sha1-pHFXOKxMgiE3Hpy+tabMbRHsv3w=", + "dependencies": { + "ansi-256-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz", + "integrity": "sha1-kQ3lDvzHwJ49gvL4er1rcAwYgYo=" + } + } + } + } + }, + "leakage": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/leakage/-/leakage-0.3.0.tgz", + "integrity": "sha1-FdaYq9x2u8ZDlgH08wIOd+LVDDk=", + "dependencies": { + "es6-error": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.0.2.tgz", + "integrity": "sha1-7sXHJurO9Rt/a3PCDbbhsTsGnJg=" + }, + "left-pad": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.1.3.tgz", + "integrity": "sha1-YS9hwDPzqeCOk58crr7qQbbzGZo=" + }, + "memwatch-next": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/memwatch-next/-/memwatch-next-0.3.0.tgz", + "integrity": "sha1-IREFD5qQbgqi1ypOwPAInHhyb48=", + "dependencies": { + "bindings": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz", + "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=" + }, + "nan": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", + "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=" + } + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "pretty-bytes": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", + "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=" + } + } + }, + "smartchai": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/smartchai/-/smartchai-1.0.3.tgz", + "integrity": "sha1-3m0BC7i1rvJMtwsxpfUzToxBty8=", + "dependencies": { + "@types/chai": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-3.5.2.tgz", + "integrity": "sha1-wRzSgX06QBt7oPWkIPNcVhObHB4=" + }, + "@types/chai-as-promised": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-0.0.29.tgz", + "integrity": "sha1-Q9UokqqZjhhaPePiR37bhXO+HXc=", + "dependencies": { + "@types/promises-a-plus": { + "version": "0.0.27", + "resolved": "https://registry.npmjs.org/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz", + "integrity": "sha1-xkZRE0YUyEuPXXEUzokB02pgl4A=" + } + } + }, + "@types/chai-string": { + "version": "1.1.30", + "resolved": "https://registry.npmjs.org/@types/chai-string/-/chai-string-1.1.30.tgz", + "integrity": "sha1-TYdEsxpaIpX8AcmB7R4tTIoHDwo=" + }, + "chai": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", + "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", + "dependencies": { + "assertion-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz", + "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=" + }, + "deep-eql": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "dependencies": { + "type-detect": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", + "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=" + } + } + }, + "type-detect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz", + "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=" + } + } + }, + "chai-as-promised": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-6.0.0.tgz", + "integrity": "sha1-GgKkM6byTa+sY7nJb6FoTbGqjaY=", + "dependencies": { + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" + } + } + }, + "chai-string": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/chai-string/-/chai-string-1.4.0.tgz", + "integrity": "sha1-NZFAwFHTak5LGl/GuRAVL0OKjUk=" + } + } + }, + "smartdelay": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/smartdelay/-/smartdelay-1.0.3.tgz", + "integrity": "sha1-X9RNrXcmLREHAvApPvqAwHLPtXk=" + }, + "smartq": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/smartq/-/smartq-1.1.1.tgz", + "integrity": "sha1-77NYcFJg1Brhiu9//YFfe2/hfdM=", + "dependencies": { + "typed-promisify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/typed-promisify/-/typed-promisify-0.3.0.tgz", + "integrity": "sha1-G6CvXkRMh9gEdAbxjOSQkqEZGFM=" + } + } + }, + "typings-global": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/typings-global/-/typings-global-1.0.19.tgz", + "integrity": "sha1-M3anLU3h5VQb9XAiSP9kw+bqMWw=", + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" + }, + "smartshell": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/smartshell/-/smartshell-1.0.8.tgz", + "integrity": "sha1-FTV1bA/oBp9+baHj+ctsj3cJTkI=", + "dependencies": { + "@types/shelljs": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.7.2.tgz", + "integrity": "sha1-wr2z/oDNej2gh1DKiYrkTFiWcfM=", + "dependencies": { + "@types/node": { + "version": "8.0.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.7.tgz", + "integrity": "sha1-+wrQS1tvbqvgNyoyqPH7ulwTDK4=" + } + } + }, + "@types/which": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/@types/which/-/which-1.0.28.tgz", + "integrity": "sha1-AW44dim4gXvtZT/jLqtdESecjfY=" + }, + "shelljs": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", + "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "dependencies": { + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "dependencies": { + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + } + } + } + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + } + } + }, + "interpret": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz", + "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=" + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dependencies": { + "resolve": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", + "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=", + "dependencies": { + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" + } + } + } + } + } + } + }, + "which": { + "version": "1.2.14", + "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", + "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "dependencies": { + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + } + } + } + } + } + } + } + } +} diff --git a/package.json b/package.json index ae1948d..99af747 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,6 @@ "smartchai": "^1.0.3", "smartdelay": "^1.0.3", "smartq": "^1.1.1", - "typings-global": "^1.0.16" + "typings-global": "^1.0.19" } } diff --git a/ts/index.ts b/ts/index.ts index 4ca812d..87a8b0a 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,8 +1,3 @@ import 'typings-global' -import { expect } from 'smartchai' -import { tap } from './tapbundle.classes.tap' - -export { - tap, - expect -} +export { expect } from 'smartchai' +export { tap } from './tapbundle.classes.tap' diff --git a/ts/tapbundle.classes.tap.ts b/ts/tapbundle.classes.tap.ts index a6b3d9f..f1c5ab8 100644 --- a/ts/tapbundle.classes.tap.ts +++ b/ts/tapbundle.classes.tap.ts @@ -1,7 +1,7 @@ import * as plugins from './tapbundle.plugins' import { TapTest, ITestFunction } from './tapbundle.classes.taptest' - +import { TapWrap } from './tapbundle.classes.tapwrap' export class Tap { skip = { test: (...args) => { diff --git a/ts/tapbundle.classes.tapwrap.ts b/ts/tapbundle.classes.tapwrap.ts new file mode 100644 index 0000000..028b5f4 --- /dev/null +++ b/ts/tapbundle.classes.tapwrap.ts @@ -0,0 +1,14 @@ +import * as plugins from './tapbundle.plugins' + +export interface ITapWrapFunction { + (): Promise +} + +export class TapWrap { + asyncFunction: ITapWrapFunction + constructor(functionArg: ITapWrapFunction) { + // nothing here + + + } +} diff --git a/yarn.lock b/yarn.lock index abc2a63..c9c789d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,14 +15,32 @@ dependencies: "@types/chai" "*" -"@types/chai@*", "@types/chai@^3.4.35": +"@types/chai@*": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.1.tgz#37fea779617cfec3fd2b19a0247e8bbdd5133bf6" + +"@types/chai@^3.4.35": version "3.5.2" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e" +"@types/node@*": + version "8.0.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.7.tgz#fb0ad04b5b6f6eabe0372a32a8f1fbba5c130cae" + "@types/promises-a-plus@*": version "0.0.27" resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780" +"@types/shelljs@^0.7.2": + version "0.7.2" + resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.2.tgz#c2bdb3fe80cd7a3da08750ca898ae44c589671f3" + dependencies: + "@types/node" "*" + +"@types/which@^1.0.28": + version "1.0.28" + resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6" + ansi-256-colors@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a" @@ -31,9 +49,9 @@ assertion-error@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c" -balanced-match@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" beautycolor@^1.0.7: version "1.0.7" @@ -47,10 +65,10 @@ bindings@^1.2.1: resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11" brace-expansion@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" dependencies: - balanced-match "^0.4.1" + balanced-match "^1.0.0" concat-map "0.0.1" chai-as-promised@^6.0.0: @@ -60,8 +78,8 @@ chai-as-promised@^6.0.0: check-error "^1.0.2" chai-string@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.3.0.tgz#df6139f294391b1035be5606f60a843b3a5041e7" + version "1.4.0" + resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.4.0.tgz#359140c051d36a4e4b1a5fc6b910152f438a8d49" chai@^3.5.0: version "3.5.0" @@ -127,6 +145,10 @@ interpret@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + leakage@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39" @@ -196,9 +218,9 @@ semver@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" -shelljs@^0.7.7: - version "0.7.7" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" +shelljs@^0.7.8: + version "0.7.8" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -229,6 +251,17 @@ smartq@^1.1.1: typed-promisify "^0.3.0" typings-global "^1.0.14" +smartshell@^1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.8.tgz#1535756c0fe8069f7e6da1e3f9cb6c8f77094e42" + dependencies: + "@types/shelljs" "^0.7.2" + "@types/which" "^1.0.28" + shelljs "^0.7.8" + smartq "^1.1.1" + typings-global "^1.0.19" + which "^1.2.14" + type-detect@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" @@ -241,12 +274,18 @@ typed-promisify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853" -typings-global@^1.0.14, typings-global@^1.0.16: - version "1.0.16" - resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.16.tgz#489b71781af24268750c2899316400a5e482961f" +typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19: + version "1.0.19" + resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.19.tgz#3376a72d4de1e5541bf5702248ff64c3e6ea316c" dependencies: semver "^5.3.0" - shelljs "^0.7.7" + smartshell "^1.0.6" + +which@^1.2.14: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" + dependencies: + isexe "^2.0.0" wrappy@1: version "1.0.2"