diff --git a/tests/basic/test_watch.py b/tests/basic/test_watch.py index b9a026ed5..4f3dba548 100644 --- a/tests/basic/test_watch.py +++ b/tests/basic/test_watch.py @@ -6,14 +6,17 @@ from aider.watch import FileWatcher def test_ai_comment_pattern(): # Test various AI comment patterns test_comments = [ + # Python style "# ai do something", "# AI make this better", "# ai! urgent change needed", "# AI! another urgent one", - "//ai javascript style", - "//AI do that thing", - "//ai! urgent js thing", - "// ai with some space", + # JavaScript style + "//ai do something", + "//AI make this better", + "//ai! urgent change needed", + "//AI! another urgent one", + "// ai with space", "// AI with caps", "// ai! with bang", ] diff --git a/tests/fixtures/watch.js b/tests/fixtures/watch.js new file mode 100644 index 000000000..516014077 --- /dev/null +++ b/tests/fixtures/watch.js @@ -0,0 +1,27 @@ +// Regular AI comment +//ai do something +//AI make this better +//ai! urgent change needed +//AI! another urgent one +// ai with space +// AI with caps +// ai! with bang +// this is not an ai comment +// aider is not an ai comment + +function dummyFunction() { + // ai inside function + return true; +} + +class Example { + constructor() { + // ai in constructor + this.value = 42; + } + + method() { + // ai in method + return this.value; + } +}