Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-test-util

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-test-util - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

16

package.json
{
"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'
);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc