File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 108
108
$ content = file_get_contents ($ filePath );
109
109
110
110
expect ($ content )->toContain ('# My Guide ' );
111
- expect ($ content )->not ->toContain ('## ' );
112
111
expect ($ content )->toContain ('<!-- Add your custom guidelines here --> ' );
112
+ expect ($ content )->toContain ('## Project Overview ' );
113
+ // Verify no user description is added before the template sections
114
+ $ lines = explode ("\n" , $ content );
115
+ $ titleIndex = array_search ('# My Guide ' , $ lines );
116
+ $ commentIndex = array_search ('<!-- Add your custom guidelines here --> ' , $ lines );
117
+ // Between title and comment, there should only be blank lines (no ## description)
118
+ for ($ i = $ titleIndex + 1 ; $ i < $ commentIndex ; $ i ++) {
119
+ expect (trim ($ lines [$ i ]))->toBe ('' );
120
+ }
113
121
});
114
122
115
123
test ('truncates title to 200 characters ' , function (): void {
You can’t perform that action at this time.
0 commit comments