• Home
  • Health
  • Software
  • Blog
  • javascript

    Common Unit Test Errors

    #1

    Non Error object received or caught (unhandledRejection)
    

    Rejecting a promise with a non-error object, also not using await when calling the function.


    #2

    Passing a new Error('some test error'); into a callsArgWith and getting that same error as a test failure, comes from not using await on the async function being called.