Add this to your .zshrc
file
make-branch() {
git checkout -b $1
git push origin $1
}
Then use it:
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
Cases | |
New | |
assign to self -> Assigned | |
assign to other -> Assigned | |
delete -> Delete | |
add note -> New | |
fraud tagging -> New | |
custom status -> New | |
Assigned | |
disposition -> Closed |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
import { renderHook } from '@testing-library/react-hooks'; | |
import useInterval from './useInterval'; | |
const cb = jest.fn(); | |
test('useInterval waits for the delay to call the callback', () => { | |
jest.useFakeTimers(); | |
renderHook(() => useInterval(cb, 1000)); | |
jest.advanceTimersByTime(1200); | |
expect(cb).toHaveBeenCalledTimes(1); |
/** | |
* Taken from https://overreacted.io/making-setinterval-declarative-with-react-hooks/ | |
* and converted to TypeScript | |
*/ | |
import { useEffect, useRef } from 'react'; | |
function useInterval(callback: Function, delay?: number | null) { | |
const savedCallback = useRef<Function>(); | |
// Remember the latest callback. |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
Traffic light | |
Red* | |
timeout -> Green | |
Green | |
timeout -> Yellow | |
Yellow | |
timeout -> Red |
Add this to your .zshrc
file
make-branch() {
git checkout -b $1
git push origin $1
}
Then use it: