async-test-util
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "async-test-util", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Util-functions that are be useful in async tests", | ||
@@ -10,3 +10,3 @@ "main": "./dist/lib/index.js", | ||
"scripts": { | ||
"test": "npm run build && mocha -b", | ||
"test": "npm run build && mocha -b --exit", | ||
"lint": "eslint src test", | ||
@@ -32,3 +32,3 @@ "clear": "rimraf -rf ./dist", | ||
"babel-core": "6.26.0", | ||
"babel-eslint": "7.2.3", | ||
"babel-eslint": "8.0.2", | ||
"babel-loader": "7.1.2", | ||
@@ -51,9 +51,9 @@ "babel-plugin-transform-async-to-generator": "6.24.1", | ||
"babel-preset-latest": "6.24.1", | ||
"cross-env": "5.0.5", | ||
"eslint": "^4.3.0", | ||
"mocha": "3.5.0", | ||
"rimraf": "2.6.1" | ||
"cross-env": "5.1.1", | ||
"eslint": "4.11.0", | ||
"mocha": "4.0.1", | ||
"rimraf": "2.6.2" | ||
}, | ||
"dependencies": { | ||
"babel-runtime": "^6.23.0", | ||
"babel-runtime": "6.26.0", | ||
"clone": "^2.1.1", | ||
@@ -60,0 +60,0 @@ "deep-equal": "^1.0.1" |
@@ -92,3 +92,3 @@ /** | ||
export default { | ||
declare const _default: { | ||
assertThrows, | ||
@@ -105,1 +105,3 @@ clone, | ||
}; | ||
export default _default; |
@@ -91,2 +91,28 @@ const assert = require('assert'); | ||
}); | ||
it('compare to custom error', async() => { | ||
class CustomError extends Error { | ||
constructor(message) { | ||
super(message); | ||
} | ||
} | ||
const throwingFunction = () => { | ||
throw new CustomError('my custom error is thrown'); | ||
}; | ||
// via class | ||
await AsyncTestUtil.assertThrows( | ||
() => throwingFunction(), | ||
CustomError, | ||
'custom' | ||
); | ||
// via class-name | ||
await AsyncTestUtil.assertThrows( | ||
() => throwingFunction(), | ||
'CustomError', | ||
'custom' | ||
); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63150
1212
50
Updatedbabel-runtime@6.26.0