(
opts: InitializeLayerTestOptions & {
/** Automatically finalize the layer and release all resources after the test */
finalize?: boolean;
}
)
| 67 | }; |
| 68 | |
| 69 | export function testInitializeLayer( |
| 70 | opts: InitializeLayerTestOptions & { |
| 71 | /** Automatically finalize the layer and release all resources after the test */ |
| 72 | finalize?: boolean; |
| 73 | } |
| 74 | ): { |
| 75 | /** Finalize the layer and release all resources */ |
| 76 | finalize: () => void; |
| 77 | } | null { |
| 78 | const layerManager = initializeLayerManager(opts); |
| 79 | if (opts.finalize === false) { |
| 80 | return { |
| 81 | finalize: () => layerManager.finalize() |
| 82 | }; |
| 83 | } |
| 84 | layerManager.finalize(); |
| 85 | return null; |
| 86 | } |
| 87 | |
| 88 | /** Test that initializing a layer does not throw. |
| 89 | * Resolves when the layer's isLoaded flag becomes true. |
no test coverage detected
searching dependent graphs…