Repository navigation
Fixes for instrumented code that did not parse. In each case one mutant made the whole instrumented file fail, so every test importing it failed at the baseline. All eight npm packages share version 0.5.3.
Fixed
- A function body whose directive has no semicolon (
function f() { 'use strict'followed by a newline) no longer becomes'use strict'if (…)in the instrumented code. #53 - Operator swaps replace the operator itself, not a match inside a comment, and add a space where the new operator would join the code next to it:
o+-1->o- -1instead ofo--1, anda*/x/.lastIndex->a/ /x/.lastIndexinstead of a line comment. A comment likea /* a-b */ - bused to be rewritten instead of the operator, so the mutant could never be detected. The keys of those mutants change; the others keep theirs. #54 - A function body that declares a function twice, or a function and a
varwith the same name (var g; function g() {}), no longer fails to parse. Such a body is not wrapped in a block anymore. Its whole-body mutants ({},{ return 0; }) are placed around the function when it is an expression, and reported asunplaceablewhen it is a declaration. #55 - Removing
?.right after an integer literal (1?.toString()) gives1 .toString()instead of1.toString(), which read the dot as a decimal point. The?.is also found past a comment before it. #56