Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You can add more edge cases to ensure comprehensive testing. For example, test scenarios such as summing negative numbers, concatenating empty strings, and comparing values that are null or undefined.
// Edge Case: Adding negative numbers
it("should correctly add negative numbers", function() {
assert.strictEqual(-1 + -1, -2, "-1 + -1 should equal -2");
assert.strictEqual(-10 + 5, -5, "-10 + 5 should equal -5");
});
// Edge Case: Concatenating empty strings
it("should concatenate empty strings correctly", function() {
const str1 = "";
const str2 = "";
assert.strictEqual(str1 + str2, "", "Concatenating two empty strings should result in an empty string");
assert.strictEqual(str1 + "Test", "Test", "Concatenating an empty string with 'Test' should equal 'Test'");
});
// Edge Case: Comparing null and undefined
it("should compare null and undefined correctly", function() {
assert.strictEqual(null, null, "null should be strictly equal to null");
assert.notStrictEqual(null, undefined, "null should not be strictly equal to undefined");
assert.strictEqual(undefined, undefined, "undefined should be strictly equal to undefined");
});