-
Notifications
You must be signed in to change notification settings - Fork 83
Junaed/fssdk 11034 tests js to ts #1000
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
Conversation
@@ -1,916 +0,0 @@ | |||
/** |
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.
please keep the old files for now. We will remove them later
import { describe, it, expect, beforeEach, afterEach, vi, assert, Mock } from 'vitest'; | ||
import { forEach, cloneDeep } from 'lodash'; | ||
import { sprintf } from '../utils/fns'; | ||
import fns from '../utils/fns'; |
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.
we should get rid of the default export and only used named exports (for better tree-shaking. Please use named exports, and later we will remove the default export when every default import is re written
@@ -1,974 +0,0 @@ | |||
/** |
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.
please keep the old tests for now
package.json
Outdated
@@ -119,6 +119,7 @@ | |||
"@rollup/plugin-commonjs": "^11.0.2", | |||
"@rollup/plugin-node-resolve": "^7.1.1", | |||
"@types/chai": "^4.2.11", | |||
"@types/lodash": "^4.17.15", |
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.
I think we should just get rid of lodash at some point. forEach import from lodash is not needed, and for cloneDeep we can use JSON stringify and parse. We can remove loadsh when every usage of it is removed
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.
LGTM
Summary
Test conversions from JS (Mocha, Chai, Sinon) to TS (Vitest).
Test plan
Issues