| 555 | } |
| 556 | |
| 557 | func TestLockMetadataJSONCompact(t *testing.T) { |
| 558 | // Verify JSON is compact (no newlines) for single-line comment embedding |
| 559 | metadata := &LockMetadata{ |
| 560 | SchemaVersion: LockSchemaV1, |
| 561 | FrontmatterHash: "test", |
| 562 | } |
| 563 | |
| 564 | json, err := metadata.ToJSON() |
| 565 | require.NoError(t, err) |
| 566 | assert.NotContains(t, json, "\n", "JSON should be compact without newlines") |
| 567 | assert.NotContains(t, json, " ", "JSON should not have extra spaces") |
| 568 | } |
| 569 | |
| 570 | func TestSchemaVersionAsString(t *testing.T) { |
| 571 | // Verify LockSchemaVersion can be used as string |