-
-
Notifications
You must be signed in to change notification settings - Fork 641
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
Node tests #707
Closed
Closed
Node tests #707
Conversation
This file contains 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
(These are deleted as part of the testing process but this is just so we can avoid accidentally committing them if they’re left behind because of a crash, etc.)
Also include test method from QUnit in the global test space.
(There are failing tests and some tests are timing out but all test files are run.)
CI seems to be failing due to npm rate limiting (error: |
Note: When run with npm run, this runs all the tests but errors at the end with an ELIFECYCLE errno 1 (looks like permission error). To avoid the final error, the workaround is to install faucet globally (npm i -g faucet) and run it manually with npm run test:node | faucet. For practical purposes, the npm script should suffice for now.
(See http://testanything.org/tap-specification.html for the TAP specification.)
* 4 spaces * Semi-colons at the end of lines
@dfahlander I just reformatted the code to match the project style used in the other tests. Barring any changes you’d like me to make, I believe this is now ready to be merged. |
This was referenced May 29, 2018
(Usage: npm run test:node -- test-name other-test-name etc.)
Tests 114 and 115 in tests-table.js now passing. Progress on dexie#709
Test 25 in dexie#709 now passing.
Instead of ok(), using equal() – which I believe was the original intent. Not sure why the tests were passing in the browser but the number 2 in the method signature was expected to be a string by the ok() method. Fixes dexie#710
(In or-issue#15-test, finally clause.)
Closing this for cleanup purpose. |
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.
This is a first attempt at getting Dexie tests running (and eventually passing) under Node.js.
To use:
Raw TAP output
(Verbose; more informative, harder to skim.)
Pretty output
(Summary view courtesy of faucet.)
Details
I’ve added a very simple custom test runner that does the minimum it needs to set up an environment in which existing tests can run. I’ve updated the test utilities to make them isomorphic (was just a couple of variables in a couple of places).
Specifically, it:
Each script is run in its own process so that failures do not affect the others. (At this point, I thought it would be more important to give us an initial overview of the state of the tests under Node.js instead of discovering it piecemeal. We can review this decision in the future.)
Current status: the runner executes all of the tests apart from those within specific test scripts following a timeout. It does, however, make its way through all the test scripts. Some test and some test scripts are timing out. Individual test timeouts are currently set to 3 seconds and test script timeouts at 10 seconds. Some of the issues may be due to issues with the test environment I’m setting up.