-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: migrate to vitest #948
base: v3
Are you sure you want to change the base?
Conversation
Run & review this pull request in StackBlitz Codeflow. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge work, thank you! Please, follow the comments and be ready that today I will publish a couple updates and refactoring INCLUDING the async package migration to the vitest, to there will be a small merge conflicts
Also, we use `onConnect` to fetch the list from the server every 5 seconds | ||
and we don't want to call subscriptions extra times so we use `isDeepEqual` | ||
in `withDataAtom` to prevent new reference stream if nothing really changed. | ||
Also, we use onConnect to fetch the list from the server every 5 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the quotes removed?
const INTERVAL = 5 | ||
|
||
const getData = reatomAsync.from(api.getData).pipe( | ||
// add `dataAtom` and map the effect payload into it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the comments removed?
import { take, takeNested } from '@reatom/effects' | ||
import { createTestCtx } from '@reatom/testing' | ||
import { atom } from '@reatom/core' | ||
import { mapToAsync, withDataAtom } from './index' | ||
|
||
export const test = suite('mapToAsync') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to use describe
, please change the tests runner script to this:
"test": "vitest run src/*.test.ts",
"test:watch": "vitest src/*.test.ts"
Understood, I just removed that one describe usage , changed the tests runner script and fixed the comments . Should I change the tests runner scripts to "test": "vitest run src/.test.ts", |
@caio2983 ive updated the deps and the async package tests, please check
yep |
#947
Hello @artalar ,
Please let me know if any changes need to be done in this