diff options
author | 2024-02-02 20:40:39 +0700 | |
---|---|---|
committer | 2024-02-02 13:40:39 +0000 | |
commit | cd67dd0a4ffe5ebfb8a2eb47b29c5930c9f1796f (patch) | |
tree | 781c9f438956bebe55a39985daf5424d30993c3b | |
parent | 9f0d89fa7e9e7c08c8600b0c49c2cce7489a7582 (diff) | |
download | astro-cd67dd0a4ffe5ebfb8a2eb47b29c5930c9f1796f.tar.gz astro-cd67dd0a4ffe5ebfb8a2eb47b29c5930c9f1796f.tar.zst astro-cd67dd0a4ffe5ebfb8a2eb47b29c5930c9f1796f.zip |
Add new test cases for non-UTF-8 and space file names (#9947)
3 files changed, 32 insertions, 0 deletions
diff --git a/packages/astro/test/dev-routing.test.js b/packages/astro/test/dev-routing.test.js index ce71a5d59..4feef5583 100644 --- a/packages/astro/test/dev-routing.test.js +++ b/packages/astro/test/dev-routing.test.js @@ -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); diff --git a/packages/astro/test/fixtures/without-site-config/src/pages/te st.astro b/packages/astro/test/fixtures/without-site-config/src/pages/te st.astro new file mode 100644 index 000000000..42e6a5177 --- /dev/null +++ b/packages/astro/test/fixtures/without-site-config/src/pages/te st.astro @@ -0,0 +1 @@ +<div>testing</div>
\ No newline at end of file diff --git a/packages/astro/test/fixtures/without-site-config/src/pages/テスト.astro b/packages/astro/test/fixtures/without-site-config/src/pages/テスト.astro new file mode 100644 index 000000000..42e6a5177 --- /dev/null +++ b/packages/astro/test/fixtures/without-site-config/src/pages/テスト.astro @@ -0,0 +1 @@ +<div>testing</div>
\ No newline at end of file |