astro/packages/astro/test/astro-pageDirectoryUrl.test.js
Matthew Phillips 71ca09125a
Fix subpath support regressions (#2330)
* Fix subpath support regressions

* Adds a changeset

* Update tests to reflect relative URL change

* Pick a different port and hopefully windows works

* Remove bad lint warning

* Better handling of relative paths

* or

* Fixes use with pageUrlFormat

* Update the pageDirectoryUrl test
2022-01-06 16:32:24 -05:00

22 lines
550 B
JavaScript

import { expect } from 'chai';
import { loadFixture } from './test-utils.js';
describe('pageUrlFormat', () => {
let fixture;
before(async () => {
fixture = await loadFixture({
projectRoot: './fixtures/astro-page-directory-url',
buildOptions: {
pageUrlFormat: 'file',
},
});
await fixture.build();
});
it('outputs', async () => {
expect(await fixture.readFile('/client.html')).to.be.ok;
expect(await fixture.readFile('/nested-md.html')).to.be.ok;
expect(await fixture.readFile('/nested-astro.html')).to.be.ok;
});
});