test: expect the plugin sandbox assets among the CORS-enabled static paths

This commit is contained in:
Linus Rath
2026-10-26 11:48:38 +01:00
parent 0f0ebc906b
commit a4c6d7867a
+3 -1
View File
@@ -35,6 +35,8 @@ describe('Next static asset CORS', () => {
rule.headers.some((header) => header.key.toLowerCase() === 'access-control-allow-origin')
);
expect(corsRules?.map((rule) => rule.source)).toEqual(['/_next/static/:path*']);
// The plugin sandbox's prebuilt, content-hashed script and stylesheet
// (scripts/build-plugin-sandbox.mjs) are public static files too.
expect(corsRules?.map((rule) => rule.source)).toEqual(['/_next/static/:path*', '/plugin-sandbox-assets/:path*']);
});
});