03 - Use Assert.isOK and Assert.isNotOK - Quality Assurance with Chai - freeCodeCamp Tutorial
Ganesh H
From 4.45 , I meant to say pass when I kept saying fail. Oops! We can test if values are 'truthy' or 'falsy' using chai's assert isOk() and isNotOk() methods.
Link to Challenge : https://www.freecodecamp.org/learn/quality-assurance/quality-assurance-and-testing-with-chai/use-assert-isok-and-assert-isnotok Written Guide: https://www.notion.so/ganeshh123/Use-Assert-isOK-and-Assert-isNotOK-66bfc52e421b4b058067b7ecc0db0ca7
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:10 - Truthy Values In JavaScript, a truthy value is a value that is considered true when encountered in a Boolean context. All values are truthy unless they are defined as falsy. https://developer.mozilla.org/en-US/docs/Glossary/Truthy
0:26 - Falsy Values A falsy (sometimes written falsey) value is a value that is considered false when encountered in a Boolean context. JavaScript uses type conversion to coerce any value to a Boolean in contexts that require it, such as conditionals and loops. https://developer.mozilla.org/en-US/docs/Glossary/Falsy
01:56 - assert.isOk() Asserts that object is truthy. https://www.chaijs.com/api/assert/#method_isok
03:25 - assert.isNotOk() Asserts that object is falsy. https://www.chaijs.com/api/assert/#method_isnotok
05:00 - 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=wiaujg0g_hM
20443162 Bytes