mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-27 21:48:41 +02:00
v1.11.1 (#1592)
* v1.11.1 * chore: publish new website * misc: fix tests
This commit is contained in:
parent
b2fe2a65c8
commit
3496f6e609
11 changed files with 802 additions and 485 deletions
|
@ -27,7 +27,7 @@ jest.mock('../env', () => ({
|
|||
}));
|
||||
|
||||
describe('server utils', () => {
|
||||
test('minify css', () => {
|
||||
test('minify css', async () => {
|
||||
const testCss = fs.readFileSync(
|
||||
path.join(__dirname, '__fixtures__', 'test.css'),
|
||||
'utf8',
|
||||
|
@ -36,17 +36,24 @@ describe('server utils', () => {
|
|||
path.join(__dirname, '__fixtures__', 'test.md'),
|
||||
'utf8',
|
||||
);
|
||||
utils.minifyCss(testCss).then(css => expect(css).toMatchSnapshot());
|
||||
utils.minifyCss(notCss).catch(e => expect(e).toMatchSnapshot());
|
||||
const css = await utils.minifyCss(testCss);
|
||||
expect(css).toMatchSnapshot();
|
||||
|
||||
try {
|
||||
await utils.minifyCss(notCss);
|
||||
} catch (error) {
|
||||
expect(error).toMatchSnapshot();
|
||||
}
|
||||
});
|
||||
|
||||
test('autoprefix css', () => {
|
||||
test('autoprefix css', async () => {
|
||||
const testCss = fs.readFileSync(
|
||||
path.join(__dirname, '__fixtures__', 'test.css'),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
utils.autoPrefixCss(testCss).then(css => expect(css).toMatchSnapshot());
|
||||
const css = await utils.autoPrefixCss(testCss);
|
||||
expect(css).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('getLanguage', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue