angular-testing食谱:Angular 2+版的简单测试模式-源码

上传者: 42104947 | 上传时间: 2021-01-31 14:12:34 | 文件大小: 150KB | 文件类型: ZIP
角度测试配方 此仓库适用于Angular 2+版本。 该存储库的目标是为Angular提供常见测试场景的配方集合。 我为每一个建议/建议感到高兴 :grinning_face_with_big_eyes: 。 谈话(视频+幻灯片) 我一直在讲“用Angular测试”。 内容 所有方案都在下面列出,并且很好地链接到了源文件。 了解如何测试组件的@Input() 。 了解如何测试组件的@Output() ,更具体地说是EventEmitter类型。 了解如何使用fakeAsync和discardPeriodicTasks()处理组件内部的计时器。 了解如何测试可能由*ngIf语句等引起的DOM操作。 了解如何测试指令。 测试基于某些条件表达式从组件模板动态添加和删除CSS类。 使用自定义Jasmine匹配器测试动态CSS样式。 了解如何模拟不需要测试的嵌套组件 通过手动实例化组件来简单测试组件逻辑 了解将服务注入测试用例的不同方法,以及如何测试服务方法。 了解如何使用async()和fakeAsync()函数测试异步操作。 模拟了

文件下载

资源详情

[{"title":"( 75 个子文件 150KB ) angular-testing食谱:Angular 2+版的简单测试模式-源码","children":[{"title":"angular-testing-recipes-master","children":[{"title":".travis.yml <span style='color:#111;'> 351B </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"tslint.json <span style='color:#111;'> 2.96KB </span>","children":null,"spread":false},{"title":"protractor.conf.js <span style='color:#111;'> 722B </span>","children":null,"spread":false},{"title":"angular.json <span style='color:#111;'> 3.48KB </span>","children":null,"spread":false},{"title":"package-lock.json <span style='color:#111;'> 538.11KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"typings.d.ts <span style='color:#111;'> 104B </span>","children":null,"spread":false},{"title":"tsconfig.app.json <span style='color:#111;'> 209B </span>","children":null,"spread":false},{"title":"test.ts <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"assets","children":[{"title":".gitkeep <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true},{"title":"index.html <span style='color:#111;'> 302B </span>","children":null,"spread":false},{"title":"tsconfig.spec.json <span style='color:#111;'> 322B </span>","children":null,"spread":false},{"title":"app","children":[{"title":"routing","children":[{"title":"search","children":[{"title":"search.module.ts <span style='color:#111;'> 175B </span>","children":null,"spread":false},{"title":"search.component.ts <span style='color:#111;'> 344B </span>","children":null,"spread":false}],"spread":false},{"title":"app-routing.module-custom.spec.ts <span style='color:#111;'> 2.03KB </span>","children":null,"spread":false},{"title":"app.module.ts <span style='color:#111;'> 395B </span>","children":null,"spread":false},{"title":"app-routing.module.spec.ts <span style='color:#111;'> 1023B </span>","children":null,"spread":false},{"title":"home","children":[{"title":"home-routing.module.ts <span style='color:#111;'> 247B </span>","children":null,"spread":false},{"title":"home.component.ts <span style='color:#111;'> 143B </span>","children":null,"spread":false},{"title":"home.module.ts <span style='color:#111;'> 167B </span>","children":null,"spread":false}],"spread":false},{"title":"app.component.ts <span style='color:#111;'> 166B </span>","children":null,"spread":false},{"title":"app-routing.module.ts <span style='color:#111;'> 558B </span>","children":null,"spread":false}],"spread":false},{"title":"app.module.ts <span style='color:#111;'> 437B </span>","children":null,"spread":false},{"title":"components","children":[{"title":"component-mock-external.component.ts <span style='color:#111;'> 547B </span>","children":null,"spread":false},{"title":"input.component.spec.ts <span style='color:#111;'> 1015B </span>","children":null,"spread":false},{"title":"language.service.ts <span style='color:#111;'> 337B </span>","children":null,"spread":false},{"title":"dynamic-css-classes.component.spec.ts <span style='color:#111;'> 1.33KB </span>","children":null,"spread":false},{"title":"substitute-cmp-template.spec.ts <span style='color:#111;'> 2.21KB </span>","children":null,"spread":false},{"title":"counter.component.ts <span style='color:#111;'> 652B </span>","children":null,"spread":false},{"title":"content-projection.component.spec.ts <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"content-projection.component.ts <span style='color:#111;'> 307B </span>","children":null,"spread":false},{"title":"input.component.ts <span style='color:#111;'> 175B </span>","children":null,"spread":false},{"title":"dynamic-css-classes.component.ts <span style='color:#111;'> 247B </span>","children":null,"spread":false},{"title":"dynamic-styles.component.spec.ts <span style='color:#111;'> 979B </span>","children":null,"spread":false},{"title":"domtesting.component.ts <span style='color:#111;'> 278B </span>","children":null,"spread":false},{"title":"component-mock-external.component.spec.ts <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false},{"title":"domtesting.component.spec.ts <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false},{"title":"async-stream.component.ts <span style='color:#111;'> 254B </span>","children":null,"spread":false},{"title":"async-stream.component.spec.ts <span style='color:#111;'> 1.16KB </span>","children":null,"spread":false},{"title":"nested.component.spec.ts <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false},{"title":"dynamic-styles.component.ts <span style='color:#111;'> 210B </span>","children":null,"spread":false},{"title":"output.component.ts <span style='color:#111;'> 319B </span>","children":null,"spread":false},{"title":"counter.component.spec.ts <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false},{"title":"output.component.spec.ts <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false}],"spread":false},{"title":"app.component.ts <span style='color:#111;'> 214B </span>","children":null,"spread":false},{"title":"app.component.html <span style='color:#111;'> 23B </span>","children":null,"spread":false},{"title":"services","children":[{"title":"remote.service.spec.ts <span style='color:#111;'> 1012B </span>","children":null,"spread":false},{"title":"remote.service.fake-call.spec.ts <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false},{"title":"greeting.service.spec.ts <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"async.service.spec.ts <span style='color:#111;'> 967B </span>","children":null,"spread":false},{"title":"remote.service.ts <span style='color:#111;'> 392B </span>","children":null,"spread":false},{"title":"greeting.service.ts <span style='color:#111;'> 146B </span>","children":null,"spread":false},{"title":"async.service.ts <span style='color:#111;'> 234B </span>","children":null,"spread":false}],"spread":false},{"title":"pipes","children":[{"title":"filter.pipe.spec.ts <span style='color:#111;'> 1.62KB </span>","children":null,"spread":false},{"title":"filter.pipe.ts <span style='color:#111;'> 439B </span>","children":null,"spread":false}],"spread":false},{"title":"utils","children":[{"title":"helpers.ts <span style='color:#111;'> 3.20KB </span>","children":null,"spread":false},{"title":"auto-prefixer.ts <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"object-extend.ts <span style='color:#111;'> 852B </span>","children":null,"spread":false},{"title":"dom-tools.ts <span style='color:#111;'> 3.11KB </span>","children":null,"spread":false},{"title":"custom-matchers.ts <span style='color:#111;'> 7.86KB </span>","children":null,"spread":false}],"spread":false},{"title":"app.component.css <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":false},{"title":"main.ts <span style='color:#111;'> 361B </span>","children":null,"spread":false},{"title":"styles.css <span style='color:#111;'> 80B </span>","children":null,"spread":false},{"title":"polyfills.ts <span style='color:#111;'> 572B </span>","children":null,"spread":false},{"title":"environments","children":[{"title":"environment.ts <span style='color:#111;'> 386B </span>","children":null,"spread":false},{"title":"environment.prod.ts <span style='color:#111;'> 51B </span>","children":null,"spread":false}],"spread":false},{"title":"favicon.ico <span style='color:#111;'> 5.30KB </span>","children":null,"spread":false}],"spread":false},{"title":"tsconfig.json <span style='color:#111;'> 407B </span>","children":null,"spread":false},{"title":"e2e","children":[{"title":"tsconfig.e2e.json <span style='color:#111;'> 235B </span>","children":null,"spread":false},{"title":"app.po.ts <span style='color:#111;'> 220B </span>","children":null,"spread":false},{"title":"tsconfig.json <span style='color:#111;'> 349B </span>","children":null,"spread":false},{"title":"app.e2e-spec.ts <span style='color:#111;'> 343B </span>","children":null,"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 395B </span>","children":null,"spread":false},{"title":"karma.conf.js <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 4.80KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明