Skip to content
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

Add tests with mocks #4

Open
labra opened this issue Dec 8, 2019 · 0 comments
Open

Add tests with mocks #4

labra opened this issue Dec 8, 2019 · 0 comments

Comments

@labra
Copy link
Member

labra commented Dec 8, 2019

I have created a small test for the DataInfo component at: src/data/tests/dataInfo.test.js.

There are several things that I would like to improve:

1.- The test didn't work because it seems the method document.body.createTextRange is not implemented in jsDom. We found some questions in stack overflow that explain some solutions like this one. We added directly the code and it seems to work...however, it would be better to reuse that code in other components that depend on codeMirror.
2.- I would like to mock the axios calls to the server like it is explained in several places like here.
3.- I would like to test the rest of the components and options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant