Comparing version 1.1.0-beta.13 to 1.1.0-beta.14
@@ -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", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10492
309
1