Skip to content

Commit

Permalink
Add tests using options
Browse files Browse the repository at this point in the history
  • Loading branch information
Siilwyn committed Jul 29, 2023
1 parent b24be69 commit 550b6c1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/main.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,26 @@ assert.strictEqual(
"sorts given CSS",
);

assert.strictEqual(
await format("a{flex: 0; border: 1;}", {
parser: "css",
plugins: [plugin],
cssDeclarationSorterOrder: "alphabetical",
}),
"a {\n border: 1;\n flex: 0;\n}\n",
"uses order option",
);

assert.strictEqual(
await format("a{flex-grow: 0;flex: 1;}", {
parser: "css",
plugins: [plugin],
cssDeclarationSorterKeepOverrides: false,
}),
"a {\n flex: 1;\n flex-grow: 0;\n}\n",
"uses keepOverrides option",
);

assert.strictEqual(
await format("a{height: 1rem; margin-left: -#{$grid-default-gutter / 2};}", {
parser: "scss",
Expand Down

0 comments on commit 550b6c1

Please sign in to comment.