1/7
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Testing forms in vitest
expect toHaveFormValues
Optimizing store state selectors
Utilise selectors to return only necessary data to not cause unnecessary rerenders
get closest form element in test
utilise .closest: input.closest('form'); to get the first parent form
event loop - call stack, microtask, macrotask
The event loop manages the execution of multiple operations in JavaScript by continuously checking the call stack and processing tasks from the microtask and macrotask queues, ensuring non-blocking asynchronous execution.
event loop - promise handling
The Promise executor runs on the call stack. When resolved, the handlers are queued as microtasks, and once the stack is empty, the event loop moves those handlers onto the call stack for execution. The Promise itself is not "placed in the microtask queue"—only its handlers are. The process is: executor runs on call stack → handlers go to microtask queue → handlers run on call stack after the stack is empty.
Binary search and bst
Binary search divides by two.
BST is for algo forganized tree where each leaf points to a smaller in left and bigger on right. Very fast as it always divided by two per step (log m most likely(
Vitest act vs waitFor
Act Waits for synchronization of state changes. waitFor waits for resolving the ezpext, if not resolved, Waits for 100ms.
Good practice is to notify team about pipelines
GitHub webhook, teams webhook integration,