buncha stuff
This commit is contained in:
parent
1eba3a92b2
commit
e183025a16
12 changed files with 29 additions and 29 deletions
|
|
@ -17,14 +17,14 @@ uppercasePlugin.postcss = true;
|
|||
test("PostCSS applies plugins to CSS", async () => {
|
||||
const plugin = new PostCSS([uppercasePlugin()]);
|
||||
const input = "body { color: red; }";
|
||||
const output = await plugin.rewriteFile(input);
|
||||
const output = await plugin.rewriteFile(input, "test");
|
||||
expect(output).toContain("COLOR: RED;");
|
||||
});
|
||||
|
||||
test("PostCSS returns unchanged CSS if no plugins", async () => {
|
||||
const plugin = new PostCSS([]);
|
||||
const input = "body { color: blue; }";
|
||||
const output = await plugin.rewriteFile(input);
|
||||
const output = await plugin.rewriteFile(input, "test");
|
||||
expect(output).toBe(input);
|
||||
});
|
||||
|
||||
|
|
@ -43,6 +43,6 @@ test("PostCSS handles multiple plugins", async () => {
|
|||
|
||||
const plugin = new PostCSS([replaceRedPlugin(), uppercasePlugin()]);
|
||||
const input = "body { color: red; }";
|
||||
const output = await plugin.rewriteFile(input);
|
||||
const output = await plugin.rewriteFile(input, "test");
|
||||
expect(output).toContain("COLOR: GREEN;");
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue