( s: WritableSignal<T>, callback: (ctx: FieldContext<T>, p: SchemaPathTree<T>) => void, )
| 21 | } from '../../public_api'; |
| 22 | |
| 23 | function testContext<T>( |
| 24 | s: WritableSignal<T>, |
| 25 | callback: (ctx: FieldContext<T>, p: SchemaPathTree<T>) => void, |
| 26 | ) { |
| 27 | const isCalled = jasmine.createSpy(); |
| 28 | |
| 29 | TestBed.runInInjectionContext(() => { |
| 30 | const f = form<T>(s, (p) => { |
| 31 | validate(p as SchemaPath<T>, (ctx) => { |
| 32 | callback(ctx, p); |
| 33 | isCalled(); |
| 34 | return undefined; |
| 35 | }); |
| 36 | }); |
| 37 | |
| 38 | f().errors(); |
| 39 | }); |
| 40 | |
| 41 | expect(isCalled).toHaveBeenCalled(); |
| 42 | } |
| 43 | |
| 44 | describe('Field Context', () => { |
| 45 | it('value', () => { |
no test coverage detected
searching dependent graphs…