Rename several view variables for clarity.

This commit is contained in:
Dermot Duffy
2024-06-11 19:48:39 -07:00
parent f193f9925f
commit afb9af5eb4
40 changed files with 769 additions and 285 deletions
+19
View File
@@ -0,0 +1,19 @@
import { describe, expect, it } from 'vitest';
import { isActionAllowedBasedOnInteractionState } from '../../src/utils/interaction-mode';
describe('isActionAllowedBasedOnInteractionState', () => {
it('should handle interactionMode: all', () => {
expect(isActionAllowedBasedOnInteractionState('all', true)).toBeTruthy();
expect(isActionAllowedBasedOnInteractionState('all', false)).toBeTruthy();
});
it('should handle interactionMode: active', () => {
expect(isActionAllowedBasedOnInteractionState('active', true)).toBeTruthy();
expect(isActionAllowedBasedOnInteractionState('active', false)).toBeFalsy();
});
it('should handle interactionMode: inactive', () => {
expect(isActionAllowedBasedOnInteractionState('inactive', true)).toBeFalsy();
expect(isActionAllowedBasedOnInteractionState('inactive', false)).toBeTruthy();
});
});