diff --git a/biome.jsonc b/biome.jsonc index de53455ba505..63a65b9fdd6d 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -188,6 +188,26 @@ } } } + }, + { + "includes": ["**/astro/test/**"], + "linter": { + "rules": { + "style": { + "noRestrictedImports": { + "level": "error", + "options": { + "patterns": [ + { + "group": ["**/src/**"], + "message": "The test should not import the source code. Import the code from the dist/ folder instead." + } + ] + } + } + } + } + } } ] } diff --git a/packages/astro/test/types/schemas.ts b/packages/astro/test/types/schemas.ts index 5059f763b167..3f84ba2a947a 100644 --- a/packages/astro/test/types/schemas.ts +++ b/packages/astro/test/types/schemas.ts @@ -1,9 +1,9 @@ import { describe, it } from 'node:test'; import { expectTypeOf } from 'expect-type'; import type * as z from 'zod/v4'; -import { type FontProviderSchema, FontFamilySchema } from '../../src/assets/fonts/config.js'; -import type { FontProvider, FontFamily } from '../../src/assets/fonts/types.js'; -import type { CacheSchema, RouteRulesSchema } from '../../src/core/cache/config.js'; +import { type FontProviderSchema, FontFamilySchema } from '../../dist/assets/fonts/config.js'; +import type { FontProvider, FontFamily } from '../../dist/assets/fonts/types.js'; +import type { CacheSchema, RouteRulesSchema } from '../../dist/core/cache/config.js'; import type { CacheProviderConfig, RouteRules } from '../../dist/core/cache/types.js'; import type { SessionDriverConfigSchema } from '../../dist/core/session/config.js'; import type { SessionDriverConfig } from '../../dist/core/session/types.js';