A polyglot incremental mutation tester
bough docs config javascript.md
555 B · 27 lines
Markdown
at commit e7df466d

+++ title = "Configuing for JavaScript" +++

[lang.js]
include = [ "src/**/*.js", "src/**/*.jsx", ]
exclude = [ "**/*.test.*" ]

Vitest #

[vitest] allows in-src tests, which we don't want to mutate. The following config snippet tells bough not to mutate any code inside a if(import.meta.vitest){} block

[lang.js.skip]
query = [
  """
(if_statement
  condition: (parenthesized_expression
    (member_expression
      object: (meta_property)
      property: (property_identifier) @_prop))
  (#eq? @_prop "vitest")) @skip
""",
]