Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaskasky committed Feb 10, 2025
1 parent 398d6f0 commit 792e24d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"vitest": "^3.0.3"
},
"peerDependencies": {
"jotai": ">=2.5.0"
"jotai": ">=2.12.0"
},
"engines": {
"node": ">=12.20.0"
Expand Down
9 changes: 3 additions & 6 deletions tests/atomEffect.test.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import type { ReactNode } from 'react'
import { createElement, StrictMode } from 'react'
import { StrictMode, createElement } from 'react'
import { act, render, renderHook } from '@testing-library/react'
import { describe, expect, it, vi } from 'vitest'
import { Provider, useAtomValue } from 'jotai/react'
import { atom } from 'jotai/vanilla'
import {
INTERNAL_buildStoreRev1 as INTERNAL_buildStore,
INTERNAL_getBuildingBlocksRev1 as INTERNAL_getBuildingBlocks,
INTERNAL_initializeStoreHooks,
} from 'jotai/vanilla/internals'
import { describe, expect, it, vi } from 'vitest'
import { atomEffect } from '../src/atomEffect'
import { createDebugStore, createDeferred, DeferredPromise } from './test-utils'
import { DeferredPromise, createDebugStore, createDeferred } from './test-utils'

it('should run the effect on vanilla store', function test() {
const countAtom = atom(0)
Expand Down Expand Up @@ -927,7 +927,6 @@ it('should not suspend the component', function test() {
let didSuspend = false
function App() {
try {
// eslint-disable-next-line react-compiler/react-compiler
useAtomValue(watchCounterEffect)
} catch (error) {
didSuspend = didSuspend || error instanceof Promise
Expand Down Expand Up @@ -1058,7 +1057,6 @@ it('should work in StrictMode', function test() {
const effectAtom = atomEffect((get, set) => {
get(watchedAtom)
runCount++
console.log('effect', { runCount })
set(watchedAtom, (v) => v + 1)
return () => {
cleanupCount++
Expand All @@ -1068,7 +1066,6 @@ it('should work in StrictMode', function test() {
const store = createDebugStore()

function useTest() {
console.log('useTest')
useAtomValue(effectAtom, { store })
}

Expand Down

0 comments on commit 792e24d

Please sign in to comment.