-
Notifications
You must be signed in to change notification settings - Fork 39
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
changes to issue #1558 regarding failed Jest test cases #1577
base: master
Are you sure you want to change the base?
changes to issue #1558 regarding failed Jest test cases #1577
Conversation
@@ -1,4 +1,4 @@ | |||
import * as d3 from 'd3' | |||
import * as d3 from 'd3/dist/d3.min' |
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 don't feel we import things from dist
folder. This change effects the View. why are you doing this?
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.
None of the imports in the project we use dist
in path while importing. This needs to be changed.
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.
On my end I believe there is a parsing issue when I leave the import line as import * as d3 from 'd3'
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.
As per my understanding we cannot have an import from dist
folder. That mean something in the way we process this needs to change.
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.
Sounds good, I'll look into what could be changed
["@babel/preset-react",{"runtime": "automatic"}]] | ||
[ | ||
"@babel/preset-env", | ||
{ |
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 would like to keep this format same as before. What was the reason for re-formatting this?
// // The output is always the same. | ||
// return 'cssTransform'; | ||
// } | ||
// }; |
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.
You should always remove commented code , if not used
Can you email me or share your Uniqname? we are keeping track of students from EECS course who are contributing to our repo |
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 have commented on code and I felt needs change
@jxiao21 I suggest if you are assigned with this issue, you either have to take these change into you branch and have initial commit from contributor as below.
let me know if you have any question. You might have to resolve some conflict/rebase since the code needs to in sync latest from master |
Forgot to comment this yesterday but right now I may start it from scratch and use the PR as a reference since the current PR is outdated and I'm failing some of the tests with the current changes. Would that still be that would be done with a diff of the current PR? |
However you want to approach is is fine. If your code changes are adding on from this contributor change. Then have a commit with her name. But that could be added once you fixed this issue (you could do something like this But as of now you can work on fixing the issue and not worry committing with author name. I can help with that. |
I was able to make all the tests work by rewriting the CSSTransform file and updating the Jest version in package.json (this can also be done by running
npm update jest
. I used babelnpm install babel-jest --save-dev
to reconfigure some files, as I believe that was causing some of the tests to fail. The main goal was to configure Jest for ECMAScript Modules, as the issue came from trying to import d3 using ECMAScript Module syntax (import * as d3 from 'd3') in the Histogram test. Using the minified version of d3 resolved this issue. In addition to updating snapshots before running backend tests, I was able to compile all the tests successfully.