0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00

Add new test cases for non-UTF-8 and space file names (#9947)

This commit is contained in:
ktym4a 2024-02-02 20:40:39 +07:00 committed by GitHub
parent 9f0d89fa7e
commit cd67dd0a4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 32 additions and 0 deletions

View file

@ -22,6 +22,16 @@ describe('Development Routing', () => {
expect(response.status).to.equal(200);
});
it('200 when loading non-UTF-8 file name', async () => {
const response = await fixture.fetch('/テスト');
expect(response.status).to.equal(200);
});
it('200 when loading include space file name', async () => {
const response = await fixture.fetch('/te st');
expect(response.status).to.equal(200);
});
it('200 when adding search params', async () => {
const response = await fixture.fetch('/?foo=bar');
expect(response.status).to.equal(200);
@ -315,6 +325,26 @@ describe('Development Routing', () => {
expect(response.status).to.equal(200);
});
it('200 when loading /テスト.html', async () => {
const response = await fixture.fetch('/テスト.html');
expect(response.status).to.equal(200);
});
it('200 when loading /テスト', async () => {
const response = await fixture.fetch('/テスト');
expect(response.status).to.equal(200);
});
it('200 when loading /te st.html', async () => {
const response = await fixture.fetch('/te st.html');
expect(response.status).to.equal(200);
});
it('200 when loading /te st', async () => {
const response = await fixture.fetch('/te st');
expect(response.status).to.equal(200);
});
it('200 when loading /another.html', async () => {
const response = await fixture.fetch('/another.html');
expect(response.status).to.equal(200);

View file

@ -0,0 +1 @@
<div>testing</div>

View file

@ -0,0 +1 @@
<div>testing</div>