diff options
author | Cashew <52880648+Scrub1492@users.noreply.github.com> | 2024-01-14 10:51:00 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-14 03:51:00 +0000 |
commit | dcb26a8ef5c62bf6acbf8130895c37f56e8a9d3f (patch) | |
tree | 6b25d1bebff154f9535f47b69ddc62263c7eeded /test/profile-conditions-util.test.js | |
parent | 326c5335503d45daafe73daac88ae330c6bace77 (diff) |
more test updates (#510)24.01.14.0
* test updates
* remove duplicate
* fix indentation
* fix
Diffstat (limited to 'test/profile-conditions-util.test.js')
-rw-r--r-- | test/profile-conditions-util.test.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/profile-conditions-util.test.js b/test/profile-conditions-util.test.js index d5c8f8d2..a217eb7a 100644 --- a/test/profile-conditions-util.test.js +++ b/test/profile-conditions-util.test.js @@ -18,12 +18,12 @@ /* eslint-disable no-multi-spaces */ -import {expect, test} from 'vitest'; +import {describe, expect, test} from 'vitest'; import {ProfileConditionsUtil} from '../ext/js/background/profile-conditions-util.js'; /** */ function testNormalizeContext() { - test('NormalizeContext', () => { + describe('NormalizeContext', () => { /** @type {{context: import('settings').OptionsContext, expected: import('profile-conditions-util').NormalizedOptionsContext}[]} */ const data = [ // Empty @@ -51,17 +51,17 @@ function testNormalizeContext() { } ]; - for (const {context, expected} of data) { + test.each(data)('normalize-context-test-%#', ({context, expected}) => { const profileConditionsUtil = new ProfileConditionsUtil(); const actual = profileConditionsUtil.normalizeContext(context); expect(actual).toStrictEqual(expected); - } + }); }); } /** */ function testSchemas() { - test('Schemas', () => { + describe('Schemas', () => { /** @type {{conditionGroups: import('settings').ProfileConditionGroup[], expectedSchema?: import('ext/json-schema').Schema, inputs?: {expected: boolean, context: import('settings').OptionsContext}[]}[]} */ const data = [ // Empty @@ -1100,7 +1100,7 @@ function testSchemas() { } ]; - for (const {conditionGroups, expectedSchema, inputs} of data) { + test.each(data)('schemas-test-%#', ({conditionGroups, expectedSchema, inputs}) => { const profileConditionsUtil = new ProfileConditionsUtil(); const schema = profileConditionsUtil.createSchema(conditionGroups); if (typeof expectedSchema !== 'undefined') { @@ -1113,7 +1113,7 @@ function testSchemas() { expect(actual).toStrictEqual(expected); } } - } + }); }); } |