A platform for community discussion. Free, open, simple.
DEV: Improve AI-AGENTS.md for running RSpec tests (#36824)
Alan Guo Xiang Tan54bb3bbf4670
diff --git a/AI-AGENTS.md b/AI-AGENTS.mdindex cbf5c02827f..0c469dca7ff 100644--- a/AI-AGENTS.md+++ b/AI-AGENTS.md@@ -43,16 +43,33 @@ Discourse is large with long history. Understand context before changes.- Don't assert immediate UI feedback after clicks (tests browser, not app logic)### Commands++#### Ruby RSpec tests++To run all RSpec examples in file use `bin/rspec <path>`. Example:+```bash-# Ruby tests-bin/rspec [spec/path/file_spec.rb[:123]]-LOAD_PLUGINS=1 bin/rspec # Plugin tests+bin/rspec spec/path/file_spec.rb+```+To run one or more RSpec examples or groups, append the line number to the path. `bin/rspec <path>:<line_number>`. Example:++```bash+bin/rspec spec/path/file_spec.rb:123+```++#### JavaScript Tests++```bash# JavaScript tests - bin/qunitbin/qunit --help # detailed helpbin/qunit path/to/test-file.js # Run all tests in filebin/qunit path/to/tests/directory # Run all tests in directory+```++#### Linting+```bash# Lintingbin/lint path/to/file path/to/another/filebin/lint --fix path/to/file path/to/another/file