Test your Angular web application using Jasmine and Karma

提供方
Coursera Project Network
在此指导 项目中,您将:

Understand how the Jasmine test framework apply unit testing to Angular apps

Understand how Karma spawns test instances

Understand how to write unit tests in Jasmine

Clock2 hours
Intermediate中级
Cloud无需下载
Video分屏视频
Comment Dots英语(English)
Laptop仅限桌面

In this 1-hour long project-based course, you will learn how to generate a new Angular project, create components and write unit tests in the spec file. You will learn how to bootstrap your tests, and will test the presence of text and the action of clicking a button. You will test the presence of HTML attributes, and the passage of data from a parent component to a child component. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

您要培养的技能

KarmaTypescriptJasmine testingUnit TestingAngular development

分步进行学习

在与您的工作区一起在分屏中播放的视频中,您的授课教师将指导您完成每个步骤:

  1. Create a new angular project using Angular CLI, and start testing

  2. Understand how Jasmine, Karma, the spec file and TestBed work

  3. Test the main app component for displaying strings and clicking buttons

  4. Bootstrap your TestBed configuration for your tests using beforeEach

  5. Test the presence of a HTML element

  6. Test passing data between components

指导项目工作原理

您的工作空间就是浏览器中的云桌面,无需下载

在分屏视频中,您的授课教师会为您提供分步指导

常见问题

常见问题

还有其他问题吗?请访问 学生帮助中心