Skip to content

Instantly share code, notes, and snippets.

View ErikGMatos's full-sized avatar
:octocat:

Erik Garces Matos ErikGMatos

:octocat:
View GitHub Profile
export const whitelist = [
'counter',
'user'
]
export const STORAGE_NAME= 'persist:SVELTE_STORAGE'
export const whitelist = [
'counter',
]
export const STORAGE_NAME= 'persist:SVELTE_STORAGE'
import { createStore, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';
import rootReducer from './modules/rootReducer';
import rootSaga from './modules/rootSaga';
import { whitelist, STORAGE_NAME } from './persistReducer';
const sagaMonitor = null;
const SagaMiddleware = createSagaMiddleware({
sagaMonitor,
import React from 'react';
import { render, waitFor, screen, act } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import StackedBar from '~/pages/NewReports/Cards/StackedBar';
import { dashData } from './dashData';
let listener = null;
import { configure } from '@testing-library/react';
configure({ asyncUtilTimeout: 15000 }); // here you define the timeout in miliseconds
import { waitFor, screen } from '@testing-library/react';
describe('Component X', async () => {
it('should render the component and to wait for something', async () => {
// to mount the component
// here you wait for some element/text
await waitFor(() => {
expect(screen.getByText('some string')).toBeInTheDocument();
}, {
import { waitFor, screen } from '@testing-library/react';
describe('Component X', () => {
it('should render the component and to wait for something', async () => {
// to mount the component
// here you wait for some element/text
await waitFor(() => {
expect(screen.getByText('some string')).toBeInTheDocument();
})
@ErikGMatos
ErikGMatos / settings.json
Last active May 11, 2022 18:09
APENAS PARA COMPARATIVO.
{
// Define o tema do VSCode
"workbench.colorTheme": "Dracula",
"workbench.colorCustomizations": {
"activityBar.activeBorder": "#7159c1",
"activityBar.activeBackground": "#7159c159",
"bookmarks.overviewRuler": "#157EFB88",
"bookmarks.lineBackground": "#7159c159",
"bookmarks.lineBorder": "#7159c1"
},
{
// Configurações necessárias para funcionamento dos plugins
"editor.formatOnSave": false,
"[javascript]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
}
},
const [showModal, setShowModal] = useState('');
{showModal === SET_ACTIVE_MODAL.createLead && (
<ModalCreateNewLead
handleClose={resetInfoCreateNewLead}
setShowModal={setShowModal}
setCloseCallbackType={setCloseCallbackType}
closeCallbackType={closeCallbackType}
errorCallback={errorCallback}
/>