diff --git a/packages/astro/test/units/vite-plugin-astro/compile.test.js b/packages/astro/test/units/vite-plugin-astro/compile.test.js index ab4fe9d3484ca..3114ed936de3a 100644 --- a/packages/astro/test/units/vite-plugin-astro/compile.test.js +++ b/packages/astro/test/units/vite-plugin-astro/compile.test.js @@ -5,12 +5,11 @@ import { init, parse } from 'es-module-lexer'; import { resolveConfig } from 'vite'; import { compileAstro } from '../../../dist/vite-plugin-astro/compile.js'; -let inlineConfig; /** * @param {string} source * @param {string} id */ -async function compile(source, id) { +async function compile(source, id, inlineConfig = {}) { const viteConfig = await resolveConfig({ configFile: false, ...inlineConfig }, 'serve'); return await compileAstro({ compileProps: { @@ -24,10 +23,6 @@ async function compile(source, id) { } describe('astro full compile', () => { - before(() => { - inlineConfig = {}; - }) - it('should compile a single file', async () => { const result = await compile(`