New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fetchbook

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetchbook - npm Package Compare versions

Comparing version 1.1.0-beta.13 to 1.1.0-beta.14

test/db.js

16

lib/run.ts

@@ -15,7 +15,13 @@ import { FetchStory } from "..";

if (story.expect) {
expect({
status: response.status,
statusText: response.statusText,
headers: response.headers.toJSON(),
}).toMatchObject(story.expect);
try {
expect({
status: response.status,
statusText: response.statusText,
headers: response.headers.toJSON(),
}).toMatchObject(story.expect);
} catch (err: any) {
console.log(picocolors.red("✘"), story.name, response.status);
console.error(err.message);
process.exit(1);
}
}

@@ -22,0 +28,0 @@ }

{
"name": "fetchbook",
"version": "1.1.0-beta.13",
"version": "1.1.0-beta.14",
"description": "Manage your HTTP requests",

@@ -37,3 +37,3 @@ "author": "Alejandro Tardín <alejandro@tardin.com>",

"test:run": "npx fetchbook --all",
"test:start": "json-server --quiet --host :: test/db.json",
"test:start": "json-server --quiet --host :: test/db.js",
"semantic-release": "semantic-release",

@@ -40,0 +40,0 @@ "prepare": "husky install"

@@ -5,11 +5,14 @@ import { FetchStory } from "../..";

name: "Add a post",
url: "http://localhost:3000/posts/0",
url: "http://localhost:3000/posts",
init: {
method: "POST",
headers: {
"Some-Header": "value",
"Content-Type": "application/json",
},
body: JSON.stringify({
it: "works!",
}),
},
expect: {
status: 404,
status: 201,
headers: {

@@ -16,0 +19,0 @@ "content-type": "application/json; charset=utf-8",

@@ -5,3 +5,3 @@ import { FetchStory } from "../..";

name: "Get a missing post",
url: "http://localhost:3000/posts/2",
url: "http://localhost:3000/posts/0",
init: {

@@ -8,0 +8,0 @@ method: "GET",

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