Skip to content

Commit 3fc79ba

Browse files
pivotalangellistDan Hansen and Davis W. Frank
authored andcommitted
* Removed old Queue & Runner in favor of Suite using the new QueueRunner
* New reporter interface across all reporters * xdescribe & xit now store disabled specs * Rewrite of HtmlReporter to support new interface and be more performant
1 parent 0597720 commit 3fc79ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3102
-3191
lines changed

GOALS_2.0.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414

1515
### Hard
1616
* Finish killing Globals
17-
* Guidelines: everything that isn't a CTOR should be closed inside `Env`, and everything that is a CTOR needs to be `new`ed inside the `Env`
17+
* Guidelines:
18+
* New objects can have constructors on `jasmine`
19+
* Top level functions can live on `jasmine`
20+
* Top level (i.e., any `jasmine` property) should only be referenced inside the `Env` constructor
1821
* Spies
1922
* isA functions:
2023
* isArray_ - used in matchers and spies
@@ -26,20 +29,18 @@
2629
* argsToArray is used for Spies and matching
2730
* inherit is for how matchers are added/mixed in, reporters, and pretty printers
2831
* formatException is used only inside Env/spec
29-
* htmlEscape is for messages in matchers - should this be HTML at all? Is that Reporter responsibility?
30-
* Suites need to be unit-tested
31-
* Remove Queue from Suite in favor of queuerunner refactoring
32-
* Remover Runner in favor of a top-level Suite
33-
* This means Env needs to `new` a `Suite` first thing
34-
* get feature parity back on HTMLReporter
32+
* htmlEscape is for messages in matchers - should this be HTML at all? Is that * Matchers improvements
33+
* move AddMatchers to Env & global (away from spec)
34+
* make matchers unit-testable
35+
* write doc on how to make a matcher
3536

3637
### Easy
37-
* Refactor `queuerunner` into a new object
38-
* xdescribe / xit make skipped specs instead of empty blocks
3938

4039
## Other Topics
4140

4241
* Build - can we, should we redo the build and release process AGAIN in order to make it less arcane
42+
* Want to add JSHint to build
43+
* Use a standard JS/Node based concat system instead of custom Ruby?
4344
* Docs
4445
* JsDoc is a pain to host and RubyMine is pretty good at navigating. I say we kill it officially
4546
* Docco has gone over well. Should we annotate all the sources and then have Pages be more complex, having tutorials and annotated source like Backbone? Are we small enough?

lib/jasmine-core/boot/boot.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,19 @@
5353
extend(window, jasmineInterface);
5454
}
5555

56-
var htmlReporter = new jasmine.HtmlReporter(null, jasmine, env);
56+
var queryString = new jasmine.QueryString({
57+
getWindowLocation: function() { return window.location; }
58+
});
59+
60+
env.catchExceptions(queryString.getParam("catch"));
61+
62+
var htmlReporter = new jasmine.HtmlReporter({
63+
env: env,
64+
queryString: queryString,
65+
getContainer: function() { return document.body; },
66+
createElement: function() { return document.createElement.apply(document, arguments); },
67+
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
68+
});
5769

5870
env.addReporter(jasmineInterface.jsApiReporter);
5971
env.addReporter(htmlReporter);
@@ -68,6 +80,7 @@
6880
if (currentWindowOnload) {
6981
currentWindowOnload();
7082
}
83+
htmlReporter.initialize();
7184
env.execute();
7285
};
7386

0 commit comments

Comments
 (0)