-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Converted Q Unit tests to Mocha Tests #1301
base: main
Are you sure you want to change the base?
Conversation
These tests are falling because of the changes done in init.js file, I am fixing that right now |
Signed-off-by: THEBOSS0369 <[email protected]>
…ix-js into con-mocha-backup
@THEBOSS0369 Thank you very much for this, that's great! I'll take a look as soon as I can. Looks like a great improvement. @audiodude maybe you have some comments? |
I've done some basic tests by switching to the PR/branch, running npm install, and npm run test-unit and test-unit-coverage. Congratulations, this is very impressive conversion work! Just quickly, I noticed that running these commands create a bunch of temporary files in the Repo that have not been correctly ignored (see screenshot). If the coverage files are overwritten on each coverage run, then they can remain, but you should .gitignore the coverage folder. Regarding the .nyc_output folder, it should also be .gitignore'd, but these look like files with a PID, and so I imagine will be created every run and could become a nuisance in that folder. Ignoring the folder may not be enough. Please check if there is a way to prevent them being generated, or whether they get auto-cleaned up (which would be fine). |
I haven't yet reviewed the code itself. |
@Jaifroid Sir the temp files that you are seeing is not from the code instead it is due to the command This is a blog for a reference https://zinserjan.github.io/mocha-webpack/docs/guides/code-coverage.html |
Yes, I was aware that these reports were from running the command, but we don't want them being accidentally pushed to the server by a dev, so the folders containing them should at least be added to |
Got it sir i will do it, and yes right now it just shows the table's heading and empty value I wanted to confirm whether this feature is needed or not so i created as an example. Once conversion work of test is approved, I will make it working. |
This PR Fixes #1187
Description
In this PR i have converted Q Unit tests to Mocha Tests.
Tests Converted
All the tests from
unit/spec/test.js
file are converted into mocha tests. It can be found inunit/spec/mocha.test.js
Note:
In this PR i haven't deleted the test.js file as once other files are approved we can continue with deleting that file
Commands to Run the test:
npm run test-unit
: This command runs the unit tests for the application to ensure that individual units of code (such as functions or methods) are working as expected.npm run test-unit-watch
: This command allows us to continuously run tests while we work on our code. If we change a test file or the code it tests, Mocha will automatically re-run the tests.npm run test-unit-coverage
: This command runs the unit tests with code coverage reporting using NYC, which is a tool for generating code coverage reports.Test
I have done all the necessary test
npm test
no issuetests-e2e-firefox
-> All tests Passed.Screenshot for converted tests Passing