Fix wrong test (#4507)

master
Lucas Duailibe 2018-05-18 21:43:54 -03:00 committed by GitHub
parent 7d50c25195
commit 1088618b35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

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", () => {