0.0
The project is in a healthy, maintained state
A custom RuboCop cop that checks test blocks contain arrange/act/assert comments in order.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 3.12

Runtime

~> 1.0
 Project Readme

aaa-lint

Ask DeepWiki

Multi-language lint plugins that enforce the AAA (Arrange-Act-Assert) pattern in test code.

Each plugin checks that every test block contains three section-marker comments — arrange, act, assert — in that exact order.

it('adds two numbers', () => {
  // arrange
  const a = 1
  const b = 2

  // act
  const sum = add(a, b)

  // assert
  expect(sum).toBe(3)
})

Packages

Language Linter Package Version
JS / TS ESLint eslint-plugin-aaa-pattern npm
Ruby RuboCop rubocop-aaa gem
PHP PHP_CodeSniffer phpcs-aaa packagist

Customizing labels

There is no built-in preset besides the English default. Use the labels option to switch to GWT, Japanese, or any other wording:

{
  "labels": {
    "arrange": ["given"],
    "act":     ["when"],
    "assert":  ["then"]
  }
}

Documentation

Full docs (English / 日本語 / 中文 / 한국어 / Español / Français / Deutsch / Português): https://babu-ch.github.io/aaa-lint/

Development

All tests run inside Docker — no local Node/Ruby/PHP installs required. See DEVELOPMENT.md.

make test          # run all three language suites

Releasing

See RELEASE.md. The PHP package ships through a split mirror at https://github.com/babu-ch/phpcs-aaa driven by scripts/release-phpcs.sh.

License

MIT