01 - Learn How JavaScript Assertions Work - Quality Assurance with Chai - freeCodeCamp Tutorial
Ganesh H
Assert methods take in a value (variable, literal or function result) and check if a particular conditions applies on it. They take an error message as the second argument and display it in a thrown error if a test fails, giving the expected and actual value. The isNull() and isNotNull() method can be used to check if a value doesn't exist or has been assigned to null.
Link to Challenge : https://www.freecodecamp.org/learn/quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work Written Guide: https://www.notion.so/ganeshh123/Learn-How-JavaScript-Assertions-Work-27949f07cd1d48289ab7a23dd87cc05f
Full Playlist for this course : https://www.youtube.com/playlist?list=PLhGp6N0DI_1SVteCORbgwlxJkAbcTiZyj All Writen Guides for this course : https://www.notion.so/ganeshh123/54ecbf7833414db885eec37f580599b4 All My Tutorials can be found at : https://www.notion.so/Tutorials-Ganesh-H-293ea420d34a464f9a1907e0405b5f26
0:00 - Concepts: 0:03 - Assertion Methods
0:50 - assert.isNull() Asserts that value is null. https://www.chaijs.com/api/assert/#method_isnull
02:38 - assert.isNotNull() Asserts that value is not null. https://www.chaijs.com/api/assert/#method_isnotnull
03:38 - Challenge Solution -————————————————————————————————————- Chai is an assertion library, similar to Node's built-in assert. It makes testing much easier by giving you lots of assertions you can run against your code.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. Beginning with tutorials that introduce students to HTML, CSS and JavaScript, students progress to project assignments that they complete either alone or in pairs. Upon completion of all project tasks, students are partnered with other nonprofits to build web applications, giving the students practical development experience.
Thanks for Watching! ... https://www.youtube.com/watch?v=KLrGXsnHzzU
14896016 Bytes