Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions packages/astro/test/dev-routing.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div>testing</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div>testing</div>
Loading