From 1088618b3502fbe49982f9e386b5b68ad09b4232 Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Fri, 18 May 2018 21:43:54 -0300 Subject: [PATCH] Fix wrong test (#4507) --- tests_integration/__tests__/file-info.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests_integration/__tests__/file-info.js b/tests_integration/__tests__/file-info.js index 7c49a905..1420a1eb 100644 --- a/tests_integration/__tests__/file-info.js +++ b/tests_integration/__tests__/file-info.js @@ -104,7 +104,12 @@ describe("extracts file-info with inferredParser=foo when a plugin is hand-picke }); test("API getFileInfo with no args", () => { - expect(prettier.getFileInfo()).rejects.toThrow(); + // TODO: change this to `rejects.toThrow()` when we upgrade to Jest >= 22 + // https://github.com/facebook/jest/issues/3601 + expect.assertions(1); + return prettier.getFileInfo().catch(err => { + expect(err).toBeDefined(); + }); }); test("API getFileInfo.sync with no args", () => {