diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-02-16 19:33:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-17 00:33:24 +0000 |
commit | 1e69210b53151f31140bb1fbdc9f3d71fa181630 (patch) | |
tree | c8e824b531bf0fc46897ee7cf93fe375b5da946e /test/css-json.test.js | |
parent | 9432e4bb117869860db0aaa42a318fe73002d1c5 (diff) |
Make vitests idiomatic (#677)
Diffstat (limited to 'test/css-json.test.js')
-rw-r--r-- | test/css-json.test.js | 17 |
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(); +}); |