SKILL BENCHMARK

JavaScript Unit Testing Literacy (Beginner Level)

  • 18m
  • 18 questions
The JavaScript Unit Testing Literacy benchmark measures your ability to recognize the Mocha testing framework and the Unit.js assertion library. You will be evaluated on your skills in writing unit tests to test numeric values, strings, objects, arrays, truthy and falsy values, functions, promises, and exceptions using Unit.js. A learner who scores high on this benchmark demonstrates that they have the skills to test different types of objects using Unit.js and the Mocha framework, and can unit test JavaScript code intuitively using chained assertions in Should.js and Must.js.

Topics covered

  • compare objects using equality operations
  • describe how different data types can be tested using Should.js
  • describe how values of different data types can be tested
  • determine whether objects are instances of other objects
  • evaluate functions that return promises
  • evaluate numeric values using Should.js
  • examine objects and properties using Should.js
  • execute assertions to check for values that evaluate to true and false using Should.js
  • install and configure the Mocha testing environment
  • install the Unit.js assertion library
  • match strings using regular expressions and custom functions
  • recall the different styles that can be used with the Must.js API
  • recall the different styles that can be used with the Should.js API
  • run basic assertions using Must.js
  • summarize the different ways to test errors
  • use assertions to test boolean values
  • use assertions to test function objects
  • work with arrays and array elements