Socket
Socket
Sign inDemoInstall

@nestia/e2e

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestia/e2e - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

11

lib/TestValidator.js

@@ -152,4 +152,6 @@ "use strict";

return function (task) {
var message = function () {
return "Bug on ".concat(title, ": status code must be ").concat(status, ".");
var message = function (actual) {
return typeof actual === "number"
? "Bug on ".concat(title, ": status code must be ").concat(status, ", but ").concat(actual, ".")
: "Bug on ".concat(title, ": status code must be ").concat(status, ", but succeeded.");
};

@@ -161,3 +163,6 @@ var predicate = function (exp) {

? null
: new Error(message());
: new Error(message(typeof exp === "object" &&
exp.constructor.name === "HttpError"
? exp.status
: undefined));
};

@@ -164,0 +169,0 @@ try {

{
"name": "@nestia/e2e",
"version": "0.3.1",
"version": "0.3.2",
"description": "E2E test utilify functions",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -107,4 +107,6 @@ import { is_sorted } from "tstl/ranges";

<T>(task: () => T): T extends Promise<any> ? Promise<void> : void => {
const message = () =>
`Bug on ${title}: status code must be ${status}.`;
const message = (actual?: number) =>
typeof actual === "number"
? `Bug on ${title}: status code must be ${status}, but ${actual}.`
: `Bug on ${title}: status code must be ${status}, but succeeded.`;
const predicate = (exp: any): Error | null =>

@@ -115,3 +117,10 @@ typeof exp === "object" &&

? null
: new Error(message());
: new Error(
message(
typeof exp === "object" &&
exp.constructor.name === "HttpError"
? exp.status
: undefined,
),
);
try {

@@ -118,0 +127,0 @@ const output: T = task();

Sorry, the diff of this file is not supported yet

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