Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:6cd1404bec4c0c49c034
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
it("should test for empty string", function () {
expect(isEmpty('')).toBe(true);
expect(isEmpty(null)).toBe(true);
expect(isEmpty(undefined)).toBe(true);
});
 
it("should test for non-empty string", function () {
expect(isEmpty('word1')).toBe(false);
});
it("should verify for equality ", function (){
expect(isEqual('word1', 'word1')).toBe(true);
expect(isEqual('word1', 'word2')).toBe(false);
expect(isEqual('word1', ' word1 ')).toBe(false);
expect(isEqual(null, 'word1')).toBe(false);
expect(isEqual('word1', undefined)).toBe(false);
expect(isEqual('', 'word1')).toBe(false);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.