create-form.test.ts 485 B

12345678910111213141516171819
  1. /**
  2. * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
  3. * SPDX-License-Identifier: MIT
  4. */
  5. import { describe, expect, it } from 'vitest';
  6. import { createForm } from '@/core/create-form';
  7. describe('createForm', () => {
  8. it('should disableAutoInit work', async () => {
  9. const { control } = createForm({ disableAutoInit: true });
  10. expect(control._formModel.initialized).toBe(false);
  11. control.init();
  12. expect(control._formModel.initialized).toBe(true);
  13. });
  14. });