@@ -121,9 +121,10 @@ doWriteNewExpectedTest expectedJsDir filePath =
121 case formattedResult of
121 case formattedResult of
122 Right (Compiler.Result _ _ js) ->
122 Right (Compiler.Result _ _ js) ->
123 do createDirectoryIfMissing True (dropFileName expectedFilePath)
123 do createDirectoryIfMissing True (dropFileName expectedFilePath)
124− -- Force the evaluation of "js" before "writeFile"
124+ -- Force the evaluation of `js` before `writeFile`
125− -- so that if an error is raised we do not write an empty file.
125+ -- so that if an error is raised we do not unintentionally write an empty file.
126+ -- NB: `js` can be an empty string in the case of NoExpressions.elm
126− assertBool "Error: no content generated" (length js > 0)
127+ assertBool "" (length js >= 0)
127 writeFile expectedFilePath js
128 writeFile expectedFilePath js
128 assertFailure ("Wrote new expected js: " ++ expectedFilePath)
129 assertFailure ("Wrote new expected js: " ++ expectedFilePath)