summaryrefslogtreecommitdiff
path: root/test/css-json.test.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-16 19:33:24 -0500
committerGitHub <noreply@github.com>2024-02-17 00:33:24 +0000
commit1e69210b53151f31140bb1fbdc9f3d71fa181630 (patch)
treec8e824b531bf0fc46897ee7cf93fe375b5da946e /test/css-json.test.js
parent9432e4bb117869860db0aaa42a318fe73002d1c5 (diff)
Make vitests idiomatic (#677)
Diffstat (limited to 'test/css-json.test.js')
-rw-r--r--test/css-json.test.js17
1 files changed, 6 insertions, 11 deletions
diff --git a/test/css-json.test.js b/test/css-json.test.js
index 87d24d6c..25f1ca75 100644
--- a/test/css-json.test.js
+++ b/test/css-json.test.js
@@ -20,15 +20,10 @@ import fs from 'fs';
import {describe, expect, test} from 'vitest';
import {formatRulesJson, generateRules, getTargets} from '../dev/generate-css-json.js';
-/** */
-function main() {
- describe('css-json', () => {
- test.each(getTargets())('css-json-test-%#', ({cssFilePath, overridesCssFilePath, outputPath}) => {
- const actual = fs.readFileSync(outputPath, {encoding: 'utf8'});
- const expected = formatRulesJson(generateRules(cssFilePath, overridesCssFilePath));
- expect(actual).toStrictEqual(expected);
- });
+describe('css-json', () => {
+ test.each(getTargets())('css-json-test-%#', ({cssFilePath, overridesCssFilePath, outputPath}) => {
+ const actual = fs.readFileSync(outputPath, {encoding: 'utf8'});
+ const expected = formatRulesJson(generateRules(cssFilePath, overridesCssFilePath));
+ expect(actual).toStrictEqual(expected);
});
-}
-
-main();
+});