diff options
Diffstat (limited to 'packages/astro/test/content-layer.test.js')
-rw-r--r-- | packages/astro/test/content-layer.test.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/packages/astro/test/content-layer.test.js b/packages/astro/test/content-layer.test.js index 41d2f0fce..0a7e2b289 100644 --- a/packages/astro/test/content-layer.test.js +++ b/packages/astro/test/content-layer.test.js @@ -288,7 +288,7 @@ describe('Content Layer', () => { assert.equal(newJson.entryWithReference.data.something?.content, 'transform me'); }); - it('clears the store on new build if the config has changed', async () => { + it('clears the store on new build if the content config has changed', async () => { let newJson = devalue.parse(await fixture.readFile('/collections.json')); assert.equal(newJson.increment.data.lastValue, 1); await fixture.editFile('src/content.config.ts', (prev) => { @@ -299,6 +299,18 @@ describe('Content Layer', () => { assert.equal(newJson.increment.data.lastValue, 1); await fixture.resetAllFiles(); }); + + it('clears the store on new build if the Astro config has changed', async () => { + let newJson = devalue.parse(await fixture.readFile('/collections.json')); + assert.equal(newJson.increment.data.lastValue, 1); + await fixture.editFile('astro.config.mjs', (prev) => { + return prev.replace('Astro content layer', 'Astro more content layer'); + }); + await fixture.build(); + newJson = devalue.parse(await fixture.readFile('/collections.json')); + assert.equal(newJson.increment.data.lastValue, 1); + await fixture.resetAllFiles(); + }); }); describe('Dev', () => { |