This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PubSub { | |
constructor() { | |
this.events = {}; | |
} | |
subscribe(eventName, callback) { | |
if (!this.events[eventName]) { | |
this.events[eventName] = []; | |
} | |
this.events[eventName].push(callback); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Provider } from "react-redux"; | |
import thunk, { ThunkMiddleware } from "redux-thunk"; | |
import { render, RenderAPI } from "react-test-renderer"; | |
import configureMockStore from "redux-mock-store"; | |
import TestComponent from "./TestComponent"; | |
import { describe } from "node:test"; | |
const middlewares: Array<ThunkMiddleware> = [thunk]; | |
const createMockStore = configureMockStore(middlewares); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Notifee from "@notifee/react-native"; | |
jest.spyOn(Notifee, "requestpermission"); | |
Notifee.requestPermission.mockImplementation(() => { | |
throw new Error(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"key": "shift+ctrl+f", | |
"command": "editor.action.formatSelection", | |
"when": "editorHasDocumentSelectionFormattingProvider && editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "ctrl+k ctrl+f", | |
"command": "-editor.action.formatSelection", | |
"when": "editorHasDocumentSelectionFormattingProvider && editorTextFocus && !editorReadonly" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
interface iPieChart { | |
data: any[]; | |
pieContainerCustomStyles?: React.CSSProperties; | |
} | |
const PieChart = ({ | |
data, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Update `~/Library/Application Support/Code/User/keybindings.json` file for keyboard shortcuts | |
[ | |
{ | |
"key": "shift+cmd+f", | |
"command": "editor.action.formatSelection", | |
"when": "editorHasDocumentSelectionFormattingProvider && editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "cmd+k cmd+f", | |
"command": "-editor.action.formatSelection", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"[jsonc]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[typescript]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"diffEditor.ignoreTrimWhitespace": false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jest.mock(“$dashboard/Contact service", ()=> ({ | |
_esModule: true, | |
default: ()=> ({ | |
getDashboardData: jest.fn() | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {StyleProp, ViewStyle} from 'react-native'; | |
interface IInputProps { | |
inputValue: string | number; | |
handleChange?: (updatedValue: string) => void; | |
inputLabel?: string; | |
customStyle?: StyleProp<ViewStyle>; | |
} | |
export type {IInputProps}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "dadawa-dagdhwaj", | |
"displayName": "Arya Stark", | |
"jobTitle": "Warrior", | |
"contactStr": "", | |
"imageBase64Path": "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wgARCAEAAQADASIAAhEBAxEB/8QAGwAAAQUBAQAAAAAAAAAAAAAAAAECAwQFBgf/xAAZAQEBAQEBAQAAAAAAAAAAAAAAAQIDBAX/2gAMAwEAAhADEAAAAfKgAACeKxvLGrLZDK6SyokyTULXGK2Vsiyb/O2ZrUz235rIfdhWpDerswituYxzUAAAAAACSVk/TCPRmsvVjJQLCVHXSapt1bGemMnVWMdOPi9K1MvIZe54TWdGrDuTeHW0a15wMe25QAAAABzX2Pngl3lkiNRrFizu7cgt9/M981ydDqcnpfP6rVtLfLcMN2HNyec6ujnfkOhe57vwv1rdUr171TWIwEAAACaGbUc5j9Zs15qljGkvPd2eOf0+W3pVNbn3s7ePteb161ita56ssnVjOh06vPfJeVe2eWdFWk9nbjJVliuYxUQAAAWSN2o5zVsmrSRQl6lY1nVt5V7v5dW9iv5ejptrluo8/r0refZ570pcepcb9TjuXX0bzufIbwJGr14QjkZYioAAACvjksVVi1Bo7NLddms6FTRqbxUOnz86pdrw/bc+vVcp23Cc+/Nt6el145/X8k2XpeOj6PO+bbLV1zuRPqkaAyAAACoVNE51kTkIvNdc9Hmq21drNtZW655ffcJ6R4/odNTuQefvn529zfS5eD0vRaz |
NewerOlder