Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QUnit doesn't print any results

I have the most basic examples of a test runner page shown on the QUnit page inserted into an MVC project.

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>QUnit basic example</title>
  <link rel="stylesheet" href="../Content/qunit-1.11.0.css">
</head>
<body>
  <div id="Div1"></div>
  <div id="Div2"></div>
  <script src="../Scripts/qunit-1.11.0.js"></script>
  <script>
      test("a basic test example", function () {
          var value = "hello";
          equal(value, "hello", "We expect value to be hello");
      });
  </script>
</body>
</html>

When I run this, I just see a blank page. The tests execute as they stop on a breakpoint. Links to the .css and .js are correct and working.

like image 404
SeeNoWeevil Avatar asked Dec 09 '22 17:12

SeeNoWeevil


1 Answers

I had the same problem with MVC and fixed it by getting the source files from the qunit website rather than relying on nuget. After i did this, it all worked perfectly.

like image 81
macou Avatar answered Dec 30 '22 19:12

macou