From 4e12ce9c6c00c8737883a2e27ee629fbc75b65d0 Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Thu, 21 May 2015 16:43:37 -0300 Subject: [PATCH] Add check for when Language or Beautifier is not found in tests --- spec/beautify-languages-spec.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spec/beautify-languages-spec.coffee b/spec/beautify-languages-spec.coffee index 6080866..9af7daa 100644 --- a/spec/beautify-languages-spec.coffee +++ b/spec/beautify-languages-spec.coffee @@ -138,9 +138,15 @@ describe "BeautifyLanguages", -> completionFun = (text) -> # logger.verbose(expectedTestPath, text) if ext is ".less" expect(text instanceof Error).not.toEqual(true, text) + return beautifyCompleted = true if text instanceof Error # if text instanceof Error # return beautifyCompleted = text # text == Error - expect(typeof text).toEqual "string" + + expect(text).not.toEqual(null, "Language or Beautifier not found") + return beautifyCompleted = true if text is null + + expect(typeof text).toEqual("string", "Text: #{text}") + return beautifyCompleted = true if typeof text is "string" # Check for beautification errors if text isnt expectedContents # console.warn(allOptions, text, expectedContents)