anchor.diff:  :marked
     It failed of course.
   
  +  正如所料，测试结果是**失败**。
  +
     Restore the expectation from `false` back to `true`.
     Both processes detect the change, re-run, and karma reports complete success.
   
  +  将期望从`false`恢复为`true`。两个进程都检测到这个变化，自动重新运行，`Karma`报告测试成功。
  +
   .alert.is-helpful
     :marked
       The console log can be quite long. Keep your eye on the last line.
       It says `SUCCESS` when all is well.
  +
  +    控制台的日志可能会非常长。注意最后一样。当一切正常时，它会显示`SUCCESS`。
       
       If it says `FAILED`, scroll up to look for the error or, if that's too painful,
       pipe the console output to a file and inspect with your favorite editor.
  +
  +    如果它显示`FAILED`，往上翻查看错误。如果觉得这样太麻烦，你可以将控制台的输出内容导出到一个文件中，使用你最喜欢的编辑器查看。
     code-example(format="." language="json").
       npm test > spec-output.txt
   
   :marked
     ## Test debugging
     
  +  ## 调试测试
  +
     Debug specs in the browser in the same way you debug an application.
   
  +  在浏览器中，像调试应用一样调试测试配置。
  +
       - Reveal the karma browser window (hidden earlier).
  +
  +    - 显示`Karma`的浏览器窗口（之前被隐藏了）。
  +
       - Open the browser's “Developer Tools” (F12 or Ctrl-Shift-I).
  +
  +    - 打开浏览器的“Developer Tools”(F12或者Ctrl-Shift-I)。
  +
       - Pick the “sources” section
  +
  +    - 选择“sources”页
  +
       - Open the `1st.spec.ts` test file (Ctrl-P, then start typing the name of the file).
  +
  +    - 打开`1st.spec.ts`测试文件（Ctrl-P, 然后输入文件名字）。
  +
       - Set a breakpoint in the test
  +
  +    - 在测试中设置一个断点。
  +
       - Refresh the browser … and it stops at the breakpoint.
  +
  +    - 刷新浏览器...然后它就会停在断点上。
    
   figure.image-display
     img(src='/resources/images/devguide/testing/karma-1st-spec-debug.png' style="width:700px;" alt="Karma debugging")
   
   a(href="#top").to-top Back to top
  +a(href="#top").to-top 回到顶部
   
   .l-hr
   a#atp-intro
  
positive.code: 
  :marked
    The _karma_ watcher detects the change to the compilation output and re-runs the test.
  code-example(format="." language="bash").
    [1] Chrome 51.0.2704: Executed 0 of 1 SUCCESS
        Chrome 51.0.2704 1st tests true is true FAILED
  
negative.code:         An optional file that supplements the SystemJS configuration in `systemjs.config.js` with
          configuration for the specific needs of the application itself.
  
          一个可有可无的文件，用来配置应用自己特殊的需求，补充`systemjs.config.js`里面的SystemJS配置。
  
          A stock `systemjs.config.js` can't anticipate those needs. 
          You fill the gaps here.
  
          原装`systemjs.config.js`无法预测这些需求。你可以在这里填补空白。
  
          The sample version for this chapter adds the **model barrel**
          to the SystemJs `packages` configuration.
  
          本章例子添加了**模型封装桶**到SystemJS的`packages`配置。
    tr
      td(colspan="2") 
        +makeExample('testing/ts/systemjs.config.extras.js', '', 'systemjs.config.extras.js')(format='.')
   
  :marked
    ### npm packages
  
    ### npm包
  
    The sample tests are written to run in Jasmine and karma.
    The two "fast path" setups added the appropriate Jasmine and karma npm packages to the 
    `devDependencies` section of the `package.json`.
    They were installed when you ran `npm install`.
  
    例子中的测试是按照能在`Jasmine`和`Karma`中运行的规格编写的。以上两种“快速途径”配置测试环境，都在`package.json`的`devDependencies`中添加了合适的`Jasmine`和`karma`的`npm`包。
    你运行`npm install`时就会安装它们。
  
  .l-hr
  a#1st-karma-test
  :marked
    # The first karma test
  
    # 第一个`karma`测试
  
    Start with a simple test to make sure the setup works properly.
  
    编写一个简单的测试，来确认以上的配置是否工作正常。
  
    Create a new file called `1st.spec.ts` in the application root folder, `app/`
  
    在应用的根目录`app/`创建一个新文件，名叫`1st.spec.ts`。
  
  .alert.is-important
    :marked
  