summaryrefslogtreecommitdiff
path: root/packages/astro/test/astro-sync.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/astro/test/astro-sync.test.js')
-rw-r--r--packages/astro/test/astro-sync.test.js15
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', () => {
tr>2022-04-26Fix lockfile (#3210)Gravatar Juan Martín Seery 1-6/+0 2022-04-26Add missing is:raw in AstroBuiltinAttributes (#3209)Gravatar Erika 2-0/+6 2022-04-26Feat: support `astro add` without npm installing (#3183)Gravatar Ben Holmes 6-30/+49 2022-04-26Add Astro attributes to svg elements (#3205)Gravatar Erika 2-1/+9 2022-04-26[ci] formatGravatar bholmesdev 2-9/+9 2022-04-26Feat: `create astro` add install step (#3190)Gravatar Ben Holmes 7-162/+299 2022-04-26[ci] collect statsGravatar FredKSchott 1-0/+1 2022-04-25fix(markdown): file.url fixes (#3198)Gravatar Juan Martín Seery 11-10/+149 2022-04-25[ci] collect statsGravatar FredKSchott 1-0/+1 2022-04-24add vite to licenseGravatar Fred K. Schott 2-24/+29 2022-04-24feat(markdown): Improved types (#3191)Gravatar Juan Martín Seery 3-6/+47 2022-04-24[ci] collect statsGravatar FredKSchott 1-0/+1 2022-04-23[ci] collect statsGravatar FredKSchott 1-0/+1