mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-17 15:23:00 +00:00
19 lines
529 B
TypeScript
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);
|
|
});
|
|
});
|