extends test.jade

// Require.
block libs
  script(src="js/lib/require.js")

// Test Setup
block setup
  script.
    // Set up Mocha.
    mocha.setup("bdd");

    // AMD setup.
    require.config({
      baseUrl: "js/lib",
      shim: {
        jquery: {
          exports: "$"
        }
      }
    });

    require(["chai", "../../../chai-jq"], function (chai, plugin) {
      // Inject plugin.
      chai.use(plugin);

      // Set up AMD Chai (just make global for test cases).
      window.expect = chai.expect;

      // Add in specs.
      require(["../spec/chai-jq.spec"], function () {
        (window.mochaPhantomJS || mocha).run();
      })
    });
  //-

block specs
