parsePrettyTest filename = TestLabel filename $ TestCase $ do
  js <- parseJavaScriptFromFile filename
  let str = renderStatements js
  case parseScriptFromString "" str of
    Left err -> assertFailure (show err)
    Right (Script _ js') -> do
      let str' = renderStatements js'
      assertBool "pretty-printed code should re-parse" (str == str')
parsePrettyTest filename = TestLabel filename $ TestCase $ do
  js <- parseJavaScriptFromFile filename
  let str = renderStatements js
  case parseScriptFromString "" str of
    Left err -> assertFailure (show err)
    Right (Script _ js') -> do
      let str' = renderStatements js'
      assertBool "pretty-printed code should re-parse" (str == str')
parsePrettyTest filename = TestLabel filename $ TestCase $ do
  js <- parseJavaScriptFromFile filename
  let str = renderStatements js
  case parseScriptFromString "" str of
    Left err -> assertFailure (show err)
    Right (Script _ js') -> do
      let str' = renderStatements js'
      assertBool "pretty-printed code should re-parse" (str == str')