mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-23 22:17:00 +02:00
test: strengthen internal types (#7488)
This commit is contained in:
parent
d50fe3b670
commit
cd21a31005
15 changed files with 67 additions and 55 deletions
|
@ -10,8 +10,8 @@ import vfile from 'to-vfile';
|
|||
import postcss from 'postcss';
|
||||
import postCssRemoveOverriddenCustomProperties from '../index';
|
||||
|
||||
const processFixture = (name: string) => {
|
||||
const input = vfile.readSync(
|
||||
const processFixture = async (name: string) => {
|
||||
const input = await vfile.read(
|
||||
path.join(__dirname, '__fixtures__', `${name}.css`),
|
||||
'utf8',
|
||||
);
|
||||
|
@ -23,11 +23,11 @@ const processFixture = (name: string) => {
|
|||
};
|
||||
|
||||
describe('remove-overridden-custom-properties', () => {
|
||||
it('overridden custom properties should be removed', () => {
|
||||
expect(processFixture('normal')).toMatchSnapshot();
|
||||
it('overridden custom properties should be removed', async () => {
|
||||
await expect(processFixture('normal')).resolves.toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('overridden custom properties with `!important` rule should not be removed', () => {
|
||||
expect(processFixture('important_rule')).toMatchSnapshot();
|
||||
it('overridden custom properties with `!important` rule should not be removed', async () => {
|
||||
await expect(processFixture('important_rule')).resolves.toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue