angular-cn/tools
Tobias Bosch 8d746e3f67 feat(testing): add implicit test module
Every test now has an implicit module. It can be configured via `configureModule` (from @angular/core/testing)
to add providers, directives, pipes, ...

The compiler now has to be configured separately via `configureCompiler` (from @angular/core/testing)
to add providers or define whether to use jit.

BREAKING CHANGE:
- Application providers can no longer inject compiler internals (i.e. everything
  from `@angular/compiler). Inject `Compiler` instead. This reflects the
  changes to `bootstrap` for module support (3f55aa609f).
- Compiler providers can no longer be added via `addProviders` / `withProviders`.
  Use the new method `configureCompiler` instead.
- Platform directives / pipes need to be provided via
  `configureModule` and can no longer be provided via the
  `PLATFORM_PIPES` / `PLATFORM_DIRECTIVES` tokens.
- `setBaseTestProviders()` was renamed into `initTestEnvironment` and 
  now takes a `PlatformRef` and a factory for a
  `Compiler`.
- E.g. for the browser platform:
  
  BEFORE:
  ```
  import {setBaseTestProviders} from ‘@angular/core/testing’;
  import {TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
      TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS} from ‘@angular/platform-browser-dynamic/testing’;
  
  setBaseTestProviders(TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
      TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS);   
  ```

  AFTER:
  ```
  import {setBaseTestProviders} from ‘@angular/core/testing’;
  import {browserTestCompiler, browserDynamicTestPlatform,
      BrowserDynamicTestModule} from ‘@angular/platform-browser-dynamic/testing’;
  
  initTestEnvironment(
      browserTestCompiler,
      browserDynamicTestPlatform(),
      BrowserDynamicTestModule);

  ```
- E.g. for the server platform:
  
  BEFORE:
  ```
  import {setBaseTestProviders} from ‘@angular/core/testing’;
  import {TEST_SERVER_PLATFORM_PROVIDERS,
      TEST_SERVER_APPLICATION_PROVIDERS} from ‘@angular/platform-server/testing/server’;
  
  setBaseTestProviders(TEST_SERVER_PLATFORM_PROVIDERS,
      TEST_SERVER_APPLICATION_PROVIDERS);   
  ```

  AFTER:
  ```
  import {setBaseTestProviders} from ‘@angular/core/testing’;
  import {serverTestCompiler, serverTestPlatform,
      ServerTestModule} from ‘@angular/platform-browser-dynamic/testing’;
  
  initTestEnvironment(
      serverTestCompiler,
      serverTestPlatform(),
      ServerTestModule);

  ```

Related to #9726
Closes #9846
2016-07-06 18:04:19 -07:00
..
@angular/tsc-wrapped fix(ngc): work with typescript@next 2016-06-24 10:27:31 -07:00
analytics chore(): remove all angular2_material code. 2016-03-16 13:37:37 -07:00
broccoli cleanup(router): removes router 2016-06-20 08:47:54 -07:00
build chore(ngc): refactor out tsc-wrapped 2016-05-25 09:45:55 -07:00
cjs-jasmine feat(testing): add implicit test module 2016-07-06 18:04:19 -07:00
code.angularjs.org chore(publish): add Rx bundles to code.angularjs.org publish step 2015-12-15 17:12:42 +00:00
karma fix(test-runner): make karma internal reporter compatible with 0.13.20 (#8977) 2016-06-03 10:48:55 -07:00
npm build(npm): short-circuit npm install if node_modules are healthy 2016-05-13 22:07:41 +02:00
public_api_guard feat(testing): add implicit test module 2016-07-06 18:04:19 -07:00
travis build(travis): add travis log folding for verbose tasks 2015-10-03 21:33:57 +00:00
tree-shaking-test test: add tree-shaking test 2016-06-08 12:20:42 -07:00
tsc-watch feat(core): introduce `@AppModule` 2016-06-30 11:34:40 -07:00
tslint chore(lint): Add lint check for license headers 2016-06-23 09:46:32 -07:00
typings-test fix(typings): don't test compiler-cli typings on TS 1.8 2016-06-23 10:57:03 -07:00
check-environment.js chore(lint): re-enable clang-format on tools/ 2016-05-26 15:46:03 -07:00
chromedriverpatch.js chore(testing): update protractor to version 2.1.0 2015-05-20 17:28:23 -07:00
jsconfig.json chore(vscode): add jsconfig.json and remove .settings dir 2015-10-29 13:53:21 +00:00
tsconfig.json test: upgrade ts-api-guardian to v0.1.2 2016-06-23 14:26:40 -07:00
types.d.ts build: remove dependency on tsd and use @types/* instead 2016-05-25 16:42:28 -07:00
utils.inc feat(bundle): add script to push bundles to code.angularjs.org 2015-04-14 14:50:53 -07:00