Fix wrong test (#4507)

This commit is contained in:
Lucas Duailibe authored and GitHub committed 2018-05-18 21:43:54 -03:00
1 parent 7d50c25195
commit 1088618b35
1 file changed
+6 -1
+6 -1
View File
@@ -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", () => {