From 65ef42fadb5cab9a556770b46623b241af247fd1 Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Sun, 3 May 2015 12:20:31 -0300 Subject: [PATCH] Properly handle errors in spec tests with Promises --- spec/beautify-languages-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/beautify-languages-spec.coffee b/spec/beautify-languages-spec.coffee index d63dde4..5b3888c 100644 --- a/spec/beautify-languages-spec.coffee +++ b/spec/beautify-languages-spec.coffee @@ -146,7 +146,7 @@ describe "BeautifyLanguages", -> oldHeader="beautified" newHeader="expected" diff = JsDiff.createPatch(fileName, oldStr, newStr, oldHeader, newHeader) - throw new Error("Beautifier output does not match expected output:\n"+diff) + expect(text).toEqual(expectedContents, "Beautifier output does not match expected output:\n"+diff) # All done! beautifyCompleted = true