We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c16529b commit 873393aCopy full SHA for 873393a
test/lib/docker.spec.ts
@@ -217,7 +217,18 @@ describe("docker", () => {
217
const result = docker.save(image, destination);
218
219
// rejects with expected error
220
- await expect(result).rejects.toThrowError("server error");
+ await expect(result).rejects.toThrowError("not found");
221
+ expect(existsSync(destination)).toBeFalsy();
222
+ });
223
+
224
+ test("promise rejects when image is invalid", async () => {
225
+ const image = "someImage:latest";
226
+ const destination = "/tmp/image.tar";
227
228
+ const result = docker.save(image, destination);
229
230
+ // rejects with expected error
231
+ await expect(result).rejects.toThrowError("bad request");
232
expect(existsSync(destination)).toBeFalsy();
233
});
234
0 commit comments