diff --git a/lib/rules/no-await-sync-events.ts b/lib/rules/no-await-sync-events.ts index 1adad982..9fa3e761 100644 --- a/lib/rules/no-await-sync-events.ts +++ b/lib/rules/no-await-sync-events.ts @@ -40,7 +40,11 @@ export default createTestingLibraryRule({ type: 'object', properties: { eventModules: { - enum: VALID_EVENT_MODULES, + type: 'array', + minItems: 1, + items: { + enum: VALID_EVENT_MODULES, + }, }, }, additionalProperties: false, diff --git a/tests/lib/rules/no-await-sync-events.test.ts b/tests/lib/rules/no-await-sync-events.test.ts index bf9ebe43..5e69351c 100644 --- a/tests/lib/rules/no-await-sync-events.test.ts +++ b/tests/lib/rules/no-await-sync-events.test.ts @@ -175,7 +175,7 @@ ruleTester.run(RULE_NAME, rule, { await fireEvent.${func}('foo'); }); `, - options: [{ eventModules: 'user-event' }], + options: [{ eventModules: ['user-event'] }], })), // valid tests for user-event when only fire-event set in eventModules @@ -186,7 +186,7 @@ ruleTester.run(RULE_NAME, rule, { await userEvent.${func}('foo'); }); `, - options: [{ eventModules: 'fire-event' }], + options: [{ eventModules: ['fire-event'] }], })), ], @@ -243,7 +243,7 @@ ruleTester.run(RULE_NAME, rule, { await fireEvent.${func}('foo'); }); `, - options: [{ eventModules: 'fire-event' }], + options: [{ eventModules: ['fire-event'] }], errors: [ { line: 4, @@ -265,7 +265,7 @@ ruleTester.run(RULE_NAME, rule, { await userEvent.${func}('foo'); }); `, - options: [{ eventModules: 'user-event' }], + options: [{ eventModules: ['user-event'] }], errors: [ { line: 4,