Commit Graph

5 Commits

Author SHA1 Message Date
Yegor Jbanov 4a961f4ecb feat(di): provide two ways to create an injector, resolved and unresolved
Add two factory static functions to Injector: resolveAndCreate and
fromResolvedBindings.

We want to avoid resolution and flattening every time we create a new
injector. This commit allows the user to cache resolved bindings and
reuse them.
2015-04-13 15:06:43 -07:00
Victor Berchet 33b5ba863e feat(tests): add a test injector
fixes #614

Asynchronous test should inject an AsyncTestCompleter:

Before:

  it("async test", (done) => {
    // ...
    done();
  });

After:

  it("async test", inject([AsyncTestCompleter], (async) => {
    // ...
    async.done();
  }));

Note: inject() is currently a function and the first parameter is the
array of DI tokens to inject as the test function parameters. This
construct is linked to Traceur limitations. The planned syntax is:

  it("async test", @Inject (async: AsyncTestCompleter) => {
    // ...
    async.done();
  });
2015-03-13 18:20:02 +01:00
Tobias Bosch 821d01ab34 refactor(benchpress): export webdriver adapters in benchpress/benchpress
Also adds default bindings for protractor.
Also removes sync web driver adapter for Dart as we don’t have tests
for it yet.
2015-03-02 11:31:06 -08:00
Tobias Bosch 65ebff056a refactor(benchpress): make tests for error cases also work in Dart
Also introduces `PromiseWrapper.catchError`.
Could not use `PromiseWrapper.catch` as a name as Dart would not allow
this method name.
2015-02-26 09:24:40 -08:00
Tobias Bosch 1d4ffd986d feat(bench press): allow multiple reporters, metrics and driver extensions. 2015-02-20 17:49:47 -08:00