From 3c49c10c123e2658d29569f0b5815a8245fd0295 Mon Sep 17 00:00:00 2001 From: rexebin Date: Fri, 23 Sep 2016 22:23:19 +0100 Subject: [PATCH] fix: testing.jade. --- public/docs/ts/latest/guide/testing.jade | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/docs/ts/latest/guide/testing.jade b/public/docs/ts/latest/guide/testing.jade index 54779d9073..ae909047c0 100644 --- a/public/docs/ts/latest/guide/testing.jade +++ b/public/docs/ts/latest/guide/testing.jade @@ -703,7 +703,6 @@ a(href="#top").to-top 回到顶部 你可以,也应该为服务和管道编写孤立的单元测试。 -+makeExample('testing/ts/app/shared/title-case.pipe.spec.ts', 'mini-excerpt', 'app/shared/title-case.pipe.spec.ts (excerpt)') :marked Components can be tested in isolation as well. However, isolated unit tests don't reveal how these classes interact with Angular. @@ -1159,7 +1158,7 @@ a(href="#top").to-top 回到顶部 出人意料的是,你不敢引用测试代码里提供给测试模块`userServiceStub`对象。**它是行不通的!**。 被注入组件的`userService`实例是一个彻底**不一样**的对象,是提供的`userServiceStub`的克隆。 -+makeExample('testing/ts/app/welcome.component.spec.ts', 'stub-not-injected')(format='.') ++makeExample('testing/ts/app/welcome.component.spec.ts', 'injected-service', 'Component\'s injector')(format='.') #welcome-spec-setup :marked