1 var alreadyRun = false;
3 describe("less.js modify vars", function() {
4 beforeEach(function() {
5 // simulating "setUp" or "beforeAll" method
12 // wait until the sheet is compiled first time
14 lessOutputObj = document.getElementById("less:test-less-simple");
15 return lessOutputObj !== null;
16 }, "first generation of less:test-less-simple", 7000);
20 lessOutputObj.type = "not compiled yet";
27 // wait until variables are modified
29 lessOutputObj = document.getElementById("less:test-less-simple");
30 return lessOutputObj !== null && lessOutputObj.type === "text/css";
31 }, "second generation of less:test-less-simple", 7000);
35 testLessEqualsInDocument();
36 it("Should log only 2 XHR requests", function() {
37 var xhrLogMessages = logMessages.filter(function(item) {
38 return (/XHR: Getting '/).test(item);
40 expect(xhrLogMessages.length).toEqual(2);