0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00
astro/packages/astro/test/non-ascii-path.test.js
梁峰宁 17dbc67018
Fix slashes for paths containing non-ASCII characters on Windows. (#4712)
* Fix slashes for paths containing non-ASCII characters on Windows.

* Add non-ASCII path test

* Fix slashes in pnpm-lock.yaml
2022-09-22 14:33:28 -04:00

21 lines
517 B
JavaScript

import { expect } from 'chai';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
describe('Non-ASCII Path Test', () => {
let fixture;
before(async () => {
fixture = await loadFixture({ root: './fixtures/non-ascii-path/测试/' });
await fixture.build();
});
describe('build', () => {
it('Can load page', async () => {
const html = await fixture.readFile(`/index.html`);
const $ = cheerio.load(html);
expect($('h1').text()).to.equal('测试 OK');
});
});
});