diff options
Diffstat (limited to 'packages/astro/test/astro-sync.test.js')
-rw-r--r-- | packages/astro/test/astro-sync.test.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/astro/test/astro-sync.test.js b/packages/astro/test/astro-sync.test.js index d6b343616..94e6b326b 100644 --- a/packages/astro/test/astro-sync.test.js +++ b/packages/astro/test/astro-sync.test.js @@ -76,6 +76,14 @@ const createFixture = () => { }, /** * @param {string} path + * @param {string} content + * @param {string | undefined} error + */ + thenFileContentShouldNotInclude(path, content, error = undefined) { + assert.equal(writtenFiles[getExpectedPath(path)].includes(content), false, error); + }, + /** + * @param {string} path */ thenFileShouldBeValidTypescript(path) { try { @@ -164,6 +172,13 @@ describe('astro sync', () => { 'Types file does not include empty collection type', ); }); + + it('does not write individual types for entries when emulating legacy collections', async () => { + await fixture.load('./fixtures/content-collections/'); + fixture.clean(); + await fixture.whenSyncing(); + fixture.thenFileContentShouldNotInclude('.astro/content.d.ts', 'id: "one.md"'); + }); }); describe('astro:env', () => { |