chore: update dependencies
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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, {
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user