MCPcopy Index your code
hub / github.com/simstudioai/sim / setup

Function setup

apps/sim/hooks/use-stable-flag.test.ts:14–28  ·  view source on GitHub ↗
(options = { delayMs: DELAY_MS, minVisibleMs: MIN_VISIBLE_MS })

Source from the content-addressed store, hash-verified

12const MIN_VISIBLE_MS = 1500
13
14function setup(options = { delayMs: DELAY_MS, minVisibleMs: MIN_VISIBLE_MS }) {
15 const states: boolean[] = []
16 let active = false
17 const controller = createStableFlagController((next) => {
18 active = next
19 states.push(next)
20 }, options)
21 return {
22 controller,
23 states,
24 get active() {
25 return active
26 },
27 }
28}
29
30describe('createStableFlagController', () => {
31 beforeEach(() => {

Callers 2

setup.pyFile · 0.85

Calls 2

pushMethod · 0.45

Tested by

no test coverage detected