From bfb01149b32722aa7779d5a033f99a5579245b44 Mon Sep 17 00:00:00 2001 From: Tony Sullivan Date: Wed, 20 Apr 2022 14:33:59 +0200 Subject: [PATCH] test: updating build test to expect the base path in links/scripts --- packages/astro/test/static-build.test.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/astro/test/static-build.test.js b/packages/astro/test/static-build.test.js index a461209a20..2c4ad5d0dd 100644 --- a/packages/astro/test/static-build.test.js +++ b/packages/astro/test/static-build.test.js @@ -7,8 +7,12 @@ function addLeadingSlash(path) { } function removeBasePath(path) { +<<<<<<< HEAD // `/subpath` is defined in the test fixture's Astro config return path.replace('/subpath', ''); +======= + return path.replace('/subpath', '') +>>>>>>> f72a3e59 (test: updating build test to expect the base path in links/scripts) } /** @@ -95,14 +99,6 @@ describe('Static build', () => { const links = $('link[rel=stylesheet]'); for (const link of links) { const href = $(link).attr('href'); - - /** - * The link should be built with the config's `base` included - * as a subpath. - * - * The test needs to verify that the file will be found once the `/dist` - * output is deployed to a subpath in production by ignoring the subpath here. - */ const data = await fixture.readFile(removeBasePath(addLeadingSlash(href))); if (expected.test(data)) { return true;