Skip to content

babu-ch/aaa-lint

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors