Skip to content

Commit

Permalink
fix: fix error message in test
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryWu1234 authored and natemoo-re committed Jan 5, 2023
1 parent 5759682 commit f48ccdf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/astro/test/astro-dynamic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ describe('Dynamic components subpath', () => {
expect($('astro-island').html()).to.equal('');
// test 2: has component url
const attr = $('astro-island').attr('component-url');
expect(attr).to.include(`blog/PersistentCounter`);
expect(attr).to.include(`blog/assets/PersistentCounter`);
});
});
5 changes: 3 additions & 2 deletions packages/astro/test/astro-envs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ describe('Environment Variables', () => {
});

it('includes public env in client-side JS', async () => {
let dirs = await fixture.readdir('/');
let dirs = await fixture.readdir('/assets');
console.log(dirs)
let found = false;

// Look in all of the .js files to see if the public env is inlined.
Expand All @@ -61,7 +62,7 @@ describe('Environment Variables', () => {
await Promise.all(
dirs.map(async (path) => {
if (path.endsWith('.js')) {
let js = await fixture.readFile(`/${path}`);
let js = await fixture.readFile(`/assets/${path}`);
if (js.includes('BLUE_BAYOU')) {
found = true;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/sourcemap.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Sourcemap', async () => {
});

it('Builds sourcemap', async () => {
const dir = await fixture.readdir('.');
const dir = await fixture.readdir('./assets');
const counterMap = dir.find((file) => file.match(/^Counter\.\w+\.js\.map$/));
expect(counterMap).to.be.ok;
});
Expand Down

0 comments on commit f48ccdf

Please sign in to comment.