Draft
Conversation
Misterblue
reviewed
Jan 3, 2022
| @@ -1,78 +1,81 @@ | |||
| { | |||
| "name": "iamus-metaverse-server", | |||
| "version": "2.4.10", | |||
Contributor
There was a problem hiding this comment.
The name should change to "vircadia-metaverse", the author should be upgraded to "contributors", and the URL should be changed to "https://git.hub/vircadia/vircadia-metaverse" but I will include all those changes in a separate PR.
Misterblue
suggested changes
Jan 3, 2022
Contributor
Misterblue
left a comment
There was a problem hiding this comment.
Lots of work getting the eslint rules passing. Great job.
Only one code suggestion.
| test("addAccount, then geting it by ID, then removing it", () => { | ||
| testDatab() | ||
| .then(() => { | ||
| const accExpected = mockAccount("test3"); |
Contributor
There was a problem hiding this comment.
Rather than "mockAccount", you could use "Accounts.createAccount(user, pw)". This returns an AccountEntity with all the fields and doesn't update the database.
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.
Adds and configures Jest and eslint (over the unsupported tslint) and begins to add some initial unit testing.
Since
eslint . --fixand the.editorconfigdropped cause a lot of mess in the diffs, here's a description of everything changed per commit:Add jest as a dependency-- Simply addsjestandts-jestto the dev dependencies and adds a minimaljest.config.jsReplace tslint with eslintdid the following: add the.editorconfig, addeslintitself to the dev dependencies, copy the.eslintrc.jsdirectly from thevircadia-web-sdk, and set up a minimal.eslintignoreTemporarily remove prebuild stageremoves linting from the build process temporarily. This is to be added again when the errors that cannot be--fixed have been solved.Update tslint inline comments to eslint inline commentsdid a simple find and replace from/* tslint:disable-next-line */to// eslint-disable-next-line, however the.editorconfigmuddied the diffs some.Run eslint with --fix argumentdoes what it says on the tin, rewriting massive parts of the codebaseAdd util function to Db.ts for testingadds one function for directly setting theDatabglobal for use in unit tests, but again rewriting parts from the.editorconfig.The final commits are relegated to their own files and can be reviewed easily by examining the diffs.