Junaed/fssdk 11034 tests js to ts#1000
Merged
junaed-optimizely merged 14 commits intomasterfrom Feb 7, 2025
Merged
Conversation
raju-opti
requested changes
Feb 7, 2025
| @@ -1,916 +0,0 @@ | |||
| /** | |||
Contributor
There was a problem hiding this comment.
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'; |
Contributor
There was a problem hiding this comment.
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 @@ | |||
| /** | |||
Contributor
There was a problem hiding this comment.
please keep the old tests for now
package.json
Outdated
| "@rollup/plugin-commonjs": "^11.0.2", | ||
| "@rollup/plugin-node-resolve": "^7.1.1", | ||
| "@types/chai": "^4.2.11", | ||
| "@types/lodash": "^4.17.15", |
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test conversions from JS (Mocha, Chai, Sinon) to TS (Vitest).
Test plan
Issues