anchor.diff:    The `jasmine.done` technique, while discouraged, may become necessary when neither `async` nor `fakeAsync`
     can tolerate a particular asynchronous activity. That's rare but it happens.
   
  -  虽然不推荐使用`jasmine.done`技术，但是它可能在`async`和`fakeAsync`都无法容纳一个特定的异步行为时，变得很有必要。很少见，但是有可能发生。
  +  虽然不推荐使用`jasmine.done`技术，但是它可能在`async`和`fakeAsync`都无法容纳一个特定的异步行为时，变得很有必要。这很少见，但是有可能发生。
   
   a(href="#top").to-top Back to top
   a(href="#top").to-top 返回顶部
  
positive.code: #component-with-external-template
  :marked
    # Test a component with an external template
    The `TestBed.createComponent` is a synchronous method. 
    It assumes that everything it could need is already in memory.
  
    That has been true so far. 
    Each tested component's `@Component` metadata has a `template` property specifying an _inline templates_.
    Neither component had a `styleUrls` property.
    Everything necessary to compile them was in memory at test runtime.
  
    The `DashboardHeroComponent` is different. 
    It has an external template and external css file, specified in `templateUrl` and `styleUrls` properties.
  +makeExample('testing/ts/app/dashboard/dashboard-hero.component.ts', 'component', 'app/dashboard/dashboard-hero.component.ts (component)')(format='.')
  :marked
    The compiler must read these files from a file system before it can create a component instance.
  
    The `TestBed.compileComponents` method asynchronously compiles all the components configured in its
    current testing module. After it completes, external templates and css files, have been "inlined"
    and `TestBed.createComponent` can do its job synchronously.
  .l-sub-section
    :marked
      WebPack developers need not call `compileComponents` because it inlines templates and css
      as part of the automated build process that precedes running the test.
  :marked
    The `app/dashboard/dashboard-hero.component.spec.ts` demonstrates the pre-compilation process:
  +makeExample('testing/ts/app/dashboard/dashboard-hero.component.spec.ts', 'compile-components', 'app/dashboard/dashboard-hero.component.spec.ts (compileComponents)')(format='.')
  
  #async-in-before-each
  :marked
    ## The _async_ function in _beforeEach_
  
    Notice the `async` call in the `beforeEach`. 
    The `async` function arranges for the tester's code to run in a special _async test zone_
    that hides the mechanics of asynchronous execution, just as it does when passed to an [_it_ test)(#async).
  
  #compile-components
  :marked
    ## _compileComponents_ 
    In this example, `Testbed.compileComponents` compiles one component, the `DashboardComponent`. 
    It's the only declared component in this testing module.
  
    Tests later in this chapter have more declared components and some of them import application
    modules that declare yet more components.
    Some or all of these components could have external templates and css files.
    `TestBed.compileComponents` compiles them all asynchonously at one time.
    
    The `compileComponents` method returns a promise so you can perform additional tasks _after_ it finishes.
  
    ### _compileComponents_ closes configuration
    After `compileComponents` runs, the current `TestBed` instance is closed to further configuration.
    You cannot call any more `TestBed` configuration methods, not `configureTestModule` 
    nor any of the `override...` methods. The `TestBed` throws an error if you try.
  
  .alert.is-important
    :marked
      Do not configure the `TestBed` after calling `compileComponents`. 
      Make `compileComponents` the last step 
      before calling `TestBed.createInstance` to instantiate the _component-under-test_.
  :marked
    The `DashboardHeroComponent` spec follows the asynchonous `beforeEach` with a
    _synchronous_ `beforeEach` that completes the setup steps and runs tests ... as described in the next section.
  
  .l-hr
  
  
negative.code:      
      Jasmine的`it`方法的第二个参数（比如`'expected name'`）是一个可选附加参数。
      如果这个期待失败了，Jasmine在期待失败信息后面显示这个附加参数。
      在一个拥有多个期待的spec中，它可以帮助澄清发生了什么错误，哪个期待失败了。
      
  :marked
    The remaining tests confirm the logic of the component when the service returns different values.
  