Treehouse_JavaScript_Unit_Testing

در این آموزش تصویری نحوه تست واحد (Unit Testing) کدهای جاوااسکریپت را با استفاده از Mocha Chai و Sinon فرامی گیرید Mocha Chai و Sinon دو فریمورک برای تست کدهای Javascript روی مرورگر می باشند.

این دوره آموزشی محصول موسسه Treehouse است.

سرفصل های این دوره:

  • مقدمه
  • ساخت Test Suite
  • مفاهیم اساسی جاوا اسکریپت
  • تست آسنکرون
  • استفاده از Chai
  • قرار دادن همه با هم
  • اجرای Mocha Tests در مرورگر
  • ادغام با Travis CI
  • کار با Sinon.JS
  • معرفی Sinon
  • و …

عنوان دوره: Treehouse JavaScript Unit Testing

مدت دوره: 194 دقیقه

نویسنده: Guil Hernandez

 توضیحات:

https://teamtreehouse.com/library/javascript-unit-testing
Treehouse JavaScript Unit Testing

Guil Hernandez
194-minute


In this course, you�ll use Behavior Driven Development to write unit tests for your functions with the JavaScript testing framework Mocha.js. Writing unit tests will help you improve your code before you even start writing it. You�ll have fewer problems, and better understand the problems you do have.
What you'll learn
Different Types of Testing
Behavior Driven Development
Mocha and Chai
Writing Testable Code


Introducing Unit Testing
This stage covers different kinds of automated testing, especially �unit testing�. You'll learn what a unit test is, when you should write them, and why having unit tests is so useful.
9 steps
Introduction
1:27
Proving Our Code Works
4:22
Running Your First Automated Test
4:13
Running an Automated Test
1 objective
Different Types of Testing
3:16
Behavior Driven Development
2:47
Red, Green, Refactor
7:56
Greater Expectations
10:13
Review: Types of Testing
8 questions
Behavior Driven Development with Mocha & Chai
The real power of unit tests is when you use them to help you write code from the start. In this stage, you'll use Mocha.js and Chai to write tests about how your functions should behave as an outline for your actual code.
13 steps
Improving Our Tests
Just like your application code, you should keep your tests DRY and tidy. This stage explores handy ways to avoid repeating code. You'll also expand your tests to build your confidence in the code you've written so far.
8 steps
Next Steps
In this stage, you'll learn how Mocha can output your test results in a browser. You'll also learn testing features that simplify testing in bigger projects.
7 steps