Skip to content

Commit

Permalink
* Removed old Queue & Runner in favor of Suite using the new QueueRunner
Browse files Browse the repository at this point in the history
* New reporter interface across all reporters
* xdescribe & xit now store disabled specs
* Rewrite of HtmlReporter to support new interface and be more performant
  • Loading branch information
pivotalangellist authored and Dan Hansen and Davis W. Frank committed Feb 19, 2013
1 parent 0597720 commit 3fc79ba
Show file tree
Hide file tree
Showing 43 changed files with 3,102 additions and 3,191 deletions.
19 changes: 10 additions & 9 deletions GOALS_2.0.md
Expand Up @@ -14,7 +14,10 @@

### Hard
* Finish killing Globals
* 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`
* Guidelines:
* New objects can have constructors on `jasmine`
* Top level functions can live on `jasmine`
* Top level (i.e., any `jasmine` property) should only be referenced inside the `Env` constructor
* Spies
* isA functions:
* isArray_ - used in matchers and spies
Expand All @@ -26,20 +29,18 @@
* argsToArray is used for Spies and matching
* inherit is for how matchers are added/mixed in, reporters, and pretty printers
* formatException is used only inside Env/spec
* htmlEscape is for messages in matchers - should this be HTML at all? Is that Reporter responsibility?
* Suites need to be unit-tested
* Remove Queue from Suite in favor of queuerunner refactoring
* Remover Runner in favor of a top-level Suite
* This means Env needs to `new` a `Suite` first thing
* get feature parity back on HTMLReporter
* htmlEscape is for messages in matchers - should this be HTML at all? Is that * Matchers improvements
* move AddMatchers to Env & global (away from spec)
* make matchers unit-testable
* write doc on how to make a matcher

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

## Other Topics

* Build - can we, should we redo the build and release process AGAIN in order to make it less arcane
* Want to add JSHint to build
* Use a standard JS/Node based concat system instead of custom Ruby?
* Docs
* JsDoc is a pain to host and RubyMine is pretty good at navigating. I say we kill it officially
* 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?
15 changes: 14 additions & 1 deletion lib/jasmine-core/boot/boot.js
Expand Up @@ -53,7 +53,19 @@
extend(window, jasmineInterface);
}

var htmlReporter = new jasmine.HtmlReporter(null, jasmine, env);
var queryString = new jasmine.QueryString({
getWindowLocation: function() { return window.location; }
});

env.catchExceptions(queryString.getParam("catch"));

var htmlReporter = new jasmine.HtmlReporter({
env: env,
queryString: queryString,
getContainer: function() { return document.body; },
createElement: function() { return document.createElement.apply(document, arguments); },
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
});

env.addReporter(jasmineInterface.jsApiReporter);
env.addReporter(htmlReporter);
Expand All @@ -68,6 +80,7 @@
if (currentWindowOnload) {
currentWindowOnload();
}
htmlReporter.initialize();
env.execute();
};

Expand Down

0 comments on commit 3fc79ba

Please sign in to comment.