SNUTS.js: Sniffing Nasty Unit Test Smells in Javascript - Oliveira, Jhonatan; Mateus, Luigi; Virgínio, Tássio; Rocha, Larissa (Anais do Simpósio Brasileiro de Engenharia de Software (SBES); 2024: Anais do XXXVIII Simpósio Brasileiro de Engenharia de SoftwareDO - 10.5753/sbes.2024.3563, 2024)
Test smells indicate potential issues or weaknesses within the test code, which can compromise its effectiveness and maintainability. They highlight areas where improvements can enhance the overall quality of the test suite or testing practices. For instance, an example of a test smell is the Anonymous Test, where the test’s name lacks descriptive information about its function or purpose. Addressing these test smells can result in more robust and maintainable test suites, thus improving the reliability of the testing process. Despite significant research on these issues, tools are scarce for automatically detecting them, particularly in certain programming languages such as JavaScript. In the current landscape, existing test smell detection tools for JavaScript lack intuitiveness and graphical interfaces, and require extensive configuration, which may lead to low adoption within the developer community. To address this gap, we propose SNUTS.js, a tool designed to streamline the detection of test smells in JavaScript. Designed as an API, SNUTS.js offers versatility, allowing integration with various tools and environments. This tool goes beyond existing solutions by identifying previously undetected test smells, including the Anonymous Test, Comments Only Test, Overcommented, General Fixture, Transcripting Test, and Sensitive Equality. We also introduce a new test smell termed Test Without Description, which denotes a test case lacking descriptive text. In a preliminary evaluation, we constructed a dataset of tests sourced from real-world projects on GitHub. Through manual analysis, we identified 285 instances of test smells. SNUTS.js demonstrated a detection accuracy of 100% for three specific types of test smells, Anonymous Test, Overcommented, and General Fixture, all tailored to the JavaScript environment. Link to the video:  https://youtu.be/89z0jy4Nu0s