feat: functions.yaml has comment#147
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a generated-file warning header to the YAML manifest output in lib/src/builder/manifest.dart and includes a corresponding test case in test/snapshots/manifest_snapshot_test.dart. Feedback was provided to strengthen the test assertion by verifying the exact header string instead of just checking for a leading comment character, ensuring better protection against regressions.
| final dartYaml = File( | ||
| 'test/fixtures/dart_reference/functions.yaml', | ||
| ).readAsStringSync(); | ||
| expect(dartYaml, startsWith('#')); |
There was a problem hiding this comment.
The assertion startsWith('#') is too broad and doesn't fully validate the implementation. Since this is a snapshot test, it should verify the exact header string to ensure the generated manifest contains the correct 'Do not edit' warning and package attribution, preventing regressions in the header format.
expect(dartYaml, startsWith('# This file is generated by package:firebase_functions. Do not edit.'));There was a problem hiding this comment.
That seems like a change-detector test.
Fixes #146