tessl install tessl/npm-jest-circus@29.7.0The next-gen flux-based test runner for Jest that provides test framework globals and event-driven test execution
Agent Success
Agent success rate when using this tile
82%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.91x
Baseline
Agent success rate without this tile
43%
A test suite for an email validation function that checks various email format rules.
You have been provided with an isValidEmail function that validates email addresses according to common rules (presence of @ symbol, valid domain, no spaces, etc.). Your task is to write comprehensive tests for this function using a data-driven testing approach.
Write tests that verify the email validator correctly handles multiple test cases in an efficient, maintainable way. The tests should cover:
truefalseYour test suite should:
email.test.jsemail, expected, and reasonYour test suite should include cases like:
"user@example.com" should be valid (standard format)"invalid.email" should be invalid (missing @ symbol)"user @example.com" should be invalid (contains space)"user@domain" should be invalid (missing top-level domain)"user+tag@example.com" should be valid (plus addressing)"" should be invalid (empty string)@generates
/**
* Validates an email address format
*
* @param {string} email - The email address to validate
* @returns {boolean} True if email is valid, false otherwise
*/
function isValidEmail(email) {
// Implementation provided
}
module.exports = { isValidEmail };JavaScript testing framework for writing and running tests.