chore: update dependencies

This commit is contained in:
Sebastian Velez
2023-01-11 09:03:05 -05:00
parent 34f179a8eb
commit 32432d470d
13 changed files with 41078 additions and 16343 deletions

View File

@@ -6,7 +6,7 @@ describe('Alert Component', () => {
it('should render with proper text on success type', () => {
const text = 'Test Text';
const { container } = render(<Alert text={text} type="success" />);
expect(screen.getByText(text)).toBeTruthy();
expect(screen.getByText(text)).toBeInTheDocument();
expect(container).toMatchInlineSnapshot(`
<div>
<div
@@ -20,7 +20,7 @@ describe('Alert Component', () => {
it('should render wtih proper text on danger type', () => {
const text = 'Test Text';
const { container } = render(<Alert text={text} type="danger" />);
expect(screen.getByText(text)).toBeTruthy();
expect(screen.getByText(text)).toBeInTheDocument();
expect(container).toMatchInlineSnapshot(`
<div>
<div

View File

@@ -3,18 +3,18 @@ import config from './config';
describe('wakatime config', () => {
it('snapshot of config', () => {
expect(config).toMatchInlineSnapshot(`
Object {
"alert": Object {
"failure": Object {
{
"alert": {
"failure": {
"text": "There was an error while saving the options!",
"type": "danger",
},
"success": Object {
"success": {
"text": "Options have been saved!",
"type": "success",
},
},
"colors": Object {
"colors": {
"allGood": "",
"lightTheme": "white",
"notLogging": "gray",
@@ -28,7 +28,7 @@ describe('wakatime config', () => {
"loggingType": "domain",
"logoutUserUrl": "https://wakatime.com/logout",
"name": "WakaTime",
"states": Array [
"states": [
"allGood",
"notLogging",
"notSignedIn",
@@ -37,7 +37,7 @@ describe('wakatime config', () => {
],
"summariesApiUrl": "https://wakatime.com/api/v1/users/current/summaries",
"theme": "light",
"tooltips": Object {
"tooltips": {
"allGood": "",
"blacklisted": "This URL is blacklisted",
"notLogging": "Not logging",

View File

@@ -1,6 +1,5 @@
import { EHOSTUNREACH } from 'constants';
import { configureStore, Store } from '@reduxjs/toolkit';
import logger from 'redux-logger';
import { logger } from 'redux-logger';
import { reduxBatch } from '@manaflair/redux-batch';
import devToolsEnhancer from 'remote-redux-devtools';
import currentUserReducer, {

View File

@@ -2,15 +2,16 @@ import { RootStore } from '../stores/createStore';
import { fetchCurrentUser } from '../reducers/currentUser';
type unsub = () => void;
export default (store: RootStore) => (time: number): unsub => {
const fetchUser = () => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
store.dispatch(fetchCurrentUser());
export default (store: RootStore) =>
(time: number): unsub => {
const fetchUser = () => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
store.dispatch(fetchCurrentUser());
};
fetchUser();
const timeout = setInterval(fetchUser, time);
return () => {
clearInterval(timeout);
};
};
fetchUser();
const timeout = setInterval(fetchUser, time);
return () => {
clearInterval(timeout);
};
};