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 reject non-string values', () => {
var res = isRealString(98);
Now down below we can use expect to assert that the response variable equals false, which should be the case. We're expecting response toBe(false):
describe('isRealString', () => {
it('should reject non-string values', () => {
var res = isRealString(98);
expect(res).toBe(false);
});
});