MCPcopy
hub / github.com/brimdata/zui / constructor

Method constructor

apps/zui/src/test/system/system-test-class.tsx:43–67  ·  view source on GitHub ↗
(name: string, opts: Partial<BootArgs> = {})

Source from the content-addressed store, hash-verified

41 }
42
43 constructor(name: string, opts: Partial<BootArgs> = {}) {
44 beforeAll(async () => {
45 this.network.listen({
46 onUnhandledRequest: (req) => {
47 if (req.url.host.startsWith("localhost:")) return // Allow requests to a localhost server
48 throw new Error(
49 `Unhandled External Request: ${req.method} ${req.url.href}`
50 )
51 },
52 })
53 this.assign(await boot(name, opts))
54 this.store.dispatch(Tabs.create())
55 })
56
57 afterEach(() => this.network.resetHandlers())
58
59 afterAll(async () => {
60 teardown()
61 if (this.initialized) {
62 await this.main.stop()
63 tl.cleanup()
64 this.network.close()
65 }
66 })
67 }
68
69 navTo(path: string) {
70 Current.getHistory(this.store.getState()).push(path)

Callers

nothing calls this directly

Calls 9

assignMethod · 0.95
bootFunction · 0.90
teardownFunction · 0.90
cleanupMethod · 0.80
closeMethod · 0.80
createMethod · 0.65
listenMethod · 0.45
dispatchMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected