Skip to content

Instantly share code, notes, and snippets.

View CarmeloRicarte's full-sized avatar
🏠
Working from home

Carmelo Ricarte Rocamora CarmeloRicarte

🏠
Working from home
  • Murcia, Spain
  • 20:47 (UTC +01:00)
View GitHub Profile
@Klerith
Klerith / time-since.ts
Created November 2, 2022 20:36
Fecha de creación humana
export const timeSince = ( date: string ) => {
const baseDate = new Date(date)
const seconds = Math.floor(( new Date().getTime() - baseDate.getTime() ) / 1000);
let interval = seconds / 31536000;
@hjumeau
hjumeau / renderWithProviders.js
Created January 6, 2020 22:15
A simple test helper - store provider for react-testing-library
import { render, RenderOptions } from '@testing-library/react';
import React from 'react';
import { Provider } from 'react-redux';
import { store } from '../../store';
const Providers: React.FC = ({ children }) => {
return (
<Provider store={store}>
{children}
</Provider>