Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Mar 3, 2019
1 parent 8f7f733 commit 095f3ad
Show file tree
Hide file tree
Showing 9 changed files with 480 additions and 582 deletions.
1 change: 0 additions & 1 deletion .travis.yml
@@ -1,6 +1,5 @@
language: node_js
node_js:
- "4"
- "6"
- "8"
- "10"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-2017 thunks
Copyright (c) 2016-2019 thunks

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
92 changes: 50 additions & 42 deletions README.md
Expand Up @@ -11,47 +11,55 @@ T-man is a refactor version of [mocha](http://mochajs.org/), but more lightweigh

Summary
-------
- [Examples](#examples)
- [Simple tests](#simple-tests)
- [Mocha style tests](#mocha-style-tests)
- [Es-next tests with babel](#es-next-tests-with-babel)
- [Tests in source code](#tests-in-source-code)
- [Practical tests](#practical-tests)
- [Complex tests](#complex-tests)
- [Usage](#usage)
- [Use as CLI](#use-as-cli)
- [Use with npm](#use-with-npm)
- [Assertions](#assertions)
- [Suites and tests](#suites-and-tests)
- `tman.suite(title, fn)`, `tman.describe(title, fn)`
- `tman.test(title, fn)`, `tman.it(title, fn)`
- [Hooks](#hooks)
- `tman.before(fn)`
- `tman.after(fn)`
- `tman.beforeEach(fn)`
- `tman.afterEach(fn)`
- [Exclusive or inclusive tests](#exclusive-or-inclusive-tests)
- `tman.suite.only(title, fn)`
- `tman.it.only(title, fn)`
- `tman.suite.skip(title, fn)`
- `tman.it.skip(title, fn)`
- `tman.grep(pattern)`
- `tman.exclude(pattern)`
- [Timeouts](#timeouts)
- [Write tests in source code](#write-tests-in-source-code)
- `tman(title, fn)`
- `tman.only(title, fn)`
- `tman.skip(title, fn)`
- [Run tests](#run-tests)
- `tman.run([callback])`
- `tman.mocha()`
- [T-man CLI](#t-man-cli)
- [T-man Test mode](#t-man-test-mode)
- [TypeScript Typings](#typescript-typings)
- [Reporters](#reporters)
- [FAQ](#faq)
- [How to run CoffeeScript (or TypeScript) tests?](#how-to-run-coffeescript-or-typescript-tests)
- [License MIT](#license)
- [T-man](#t-man)
- [Summary](#summary)
- [Examples](#examples)
- [Simple tests](#simple-tests)
- [Mocha style tests](#mocha-style-tests)
- [Es-next tests with babel](#es-next-tests-with-babel)
- [Tests in source code](#tests-in-source-code)
- [Practical tests](#practical-tests)
- [Complex tests](#complex-tests)
- [Usage](#usage)
- [Use as CLI](#use-as-cli)
- [Use with npm package.json](#use-with-npm-packagejson)
- [Assertions](#assertions)
- [Suites and tests](#suites-and-tests)
- [tman.suite(title, fn), tman.describe(title, fn)](#tmansuitetitle-fn-tmandescribetitle-fn)
- [tman.test(title, fn), tman.it(title, fn)](#tmantesttitle-fn-tmanittitle-fn)
- [Hooks](#hooks)
- [tman.before(fn)](#tmanbeforefn)
- [tman.after(fn)](#tmanafterfn)
- [tman.beforeEach(fn)](#tmanbeforeeachfn)
- [tman.afterEach(fn)](#tmanaftereachfn)
- [Exclusive or inclusive tests](#exclusive-or-inclusive-tests)
- [tman.suite.only(title, fn)](#tmansuiteonlytitle-fn)
- [tman.it.only(title, fn)](#tmanitonlytitle-fn)
- [tman.suite.skip(title, fn)](#tmansuiteskiptitle-fn)
- [tman.it.skip(title, fn)](#tmanitskiptitle-fn)
- [tman.grep(pattern)](#tmangreppattern)
- [tman.exclude(pattern)](#tmanexcludepattern)
- [Timeouts](#timeouts)
- [Write tests in source code](#write-tests-in-source-code)
- [tman(title, fn)](#tmantitle-fn)
- [tman.only(title, fn)](#tmanonlytitle-fn)
- [tman.skip(title, fn)](#tmanskiptitle-fn)
- [Run tests](#run-tests)
- [tman.run([callback])](#tmanruncallback)
- [tman.mocha()](#tmanmocha)
- [tman.reset()](#tmanreset)
- [tman.loadFiles(filePath, sort)](#tmanloadfilesfilepath-sort)
- [tman.globals(globals)](#tmanglobalsglobals)
- [T-man CLI](#t-man-cli)
- [T-man test mode](#t-man-test-mode)
- [TypeScript Typings](#typescript-typings)
- [Reporters](#reporters)
- [spec](#spec)
- [dot](#dot)
- [base](#base)
- [FAQ](#faq)
- [How to run CoffeeScript (or TypeScript) tests?](#how-to-run-coffeescript-or-typescript-tests)
- [License](#license)

## Examples

Expand Down Expand Up @@ -535,7 +543,7 @@ Use `--require` option:

### License
T-man is licensed under the [MIT](https://github.com/thunks/tman/blob/master/LICENSE) license.
Copyright © 2016-2017 thunks.
Copyright © 2016-2019 thunks.

[npm-url]: https://npmjs.org/package/tman
[npm-image]: http://img.shields.io/npm/v/tman.svg
Expand Down
31 changes: 17 additions & 14 deletions browser/tman.js
Expand Up @@ -543,10 +543,12 @@ exports.Tman = function (env) {
tm.uncaught = uncaught
process.on('uncaughtException', uncaught)
function uncaught (err) {
let uncaughtHandle = rootSuite.runnerMachine || endTest
const uncaughtHandle = rootSuite.runnerMachine || endTest
err = err || new Error('uncaught exception')
err.uncaught = true
err.stack = err.stack

const stack = err.stack
err.stack = stack
if (uncaughtHandle.called) rootSuite.reporter.log(String(err))
else uncaughtHandle(err)
}
Expand Down Expand Up @@ -1193,11 +1195,12 @@ function inherits (Child, Parent) {
}

thunks.NAME = 'thunks'
thunks.VERSION = '4.9.2'
thunks.VERSION = '4.9.4'
thunks['default'] = thunks
thunks.Scope = Scope
thunks.thunk = thunks()
thunks.promise = thunks.thunk.promise
thunks.thunkify = thunks.thunk.thunkify
thunks.thunks = thunks
thunks.slice = slice
thunks.pruneErrorStack = true
Expand All @@ -1212,7 +1215,7 @@ function inherits (Child, Parent) {
},{}],6:[function(require,module,exports){
module.exports={
"name": "tman",
"version": "1.8.1",
"version": "1.9.0",
"description": "T-man: Super test manager for JavaScript.",
"authors": [
"Yan Qing <admin@zensh.com>"
Expand Down Expand Up @@ -1245,32 +1248,32 @@ module.exports={
"mocha"
],
"engines": {
"node": ">= 4.5.0"
"node": ">= 6"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/thunks/tman/issues"
},
"homepage": "https://github.com/thunks/tman",
"dependencies": {
"commander": "^2.18.0",
"diff": "~3.5.0",
"commander": "^2.19.0",
"diff": "~4.0.1",
"glob": "~7.1.3",
"supports-color": "^5.5.0",
"thunks": "~4.9.2"
"supports-color": "^6.1.0",
"thunks": "~4.9.4"
},
"devDependencies": {
"@types/mocha": "^5.2.5",
"@types/node": "^10.11.3",
"@types/mocha": "^5.2.6",
"@types/node": "^11.10.4",
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.26.0",
"coffee-script": "^1.12.7",
"istanbul": "^0.4.5",
"standard": "^11.0.1",
"ts-node": "^7.0.1",
"typescript": "^3.1.1"
"standard": "^12.0.1",
"ts-node": "^8.0.2",
"typescript": "^3.3.3333"
},
"files": [
"README.md",
Expand Down
6 changes: 4 additions & 2 deletions lib/core.js
Expand Up @@ -512,10 +512,12 @@ exports.Tman = function (env) {
tm.uncaught = uncaught
process.on('uncaughtException', uncaught)
function uncaught (err) {
let uncaughtHandle = rootSuite.runnerMachine || endTest
const uncaughtHandle = rootSuite.runnerMachine || endTest
err = err || new Error('uncaught exception')
err.uncaught = true
err.stack = err.stack

const stack = err.stack
err.stack = stack
if (uncaughtHandle.called) rootSuite.reporter.log(String(err))
else uncaughtHandle(err)
}
Expand Down
2 changes: 1 addition & 1 deletion lib/format.js
Expand Up @@ -29,7 +29,7 @@ exports.indent = function (len) {
// 22: turn off bold / bright effect, and
// 0: reset all text properties (color, background, brightness, etc.) to their default values.
// For example, one could select bright purple text on a green background (eww!) with the code `\x1B[35;1;42m`
const styles = {red: 31, green: 32, yellow: 33, cyan: 36, white: 37, gray: 90}
const styles = { red: 31, green: 32, yellow: 33, cyan: 36, white: 37, gray: 90 }
Object.keys(styles).forEach((key) => {
exports[key] = (str, bright) => style(styles[key], str, bright)
})
Expand Down

0 comments on commit 095f3ad

Please sign in to comment.