lowcode-engine/packages/utils/test/src/navtive-selection.test.ts
2023-11-13 13:00:38 +08:00

19 lines
529 B
TypeScript

import { setNativeSelection, nativeSelectionEnabled } from '../../src/navtive-selection';
describe('setNativeSelection', () => {
beforeEach(() => {
// 在每个测试运行之前重置nativeSelectionEnabled的值
setNativeSelection(true);
});
test('should enable native selection', () => {
setNativeSelection(true);
expect(nativeSelectionEnabled).toBe(true);
});
test('should disable native selection', () => {
setNativeSelection(false);
expect(nativeSelectionEnabled).toBe(false);
});
});