Test case 1 – should reject non-string values

We're going to describe the isRealString function. Then we can add our arrow function (=>), and inside there, we can go ahead and provide our individual test cases, it, and I'm going to copy it directly, should reject non-string values:

describe('isRealString', () => {  it('should reject non-string values')});

This is going to be a synchronous test, so there's no reason to add the done argument. Inside here, we're going to pass in a non-string value. I'll make a variable called response, which will store the return result from isRealString. We're going to call it passing in some sort of non-string value. Anything would work, I'm going to use a number, 98:

describe('isRealString', () => { it('should ...

Get Advanced Node.js Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.