Skip to content

Conversation

ThatUdeshUK
Copy link

Fixed issue #1

Fixed the todo in test.js to test the validator

tests/index.js Outdated
const expect = chai.expect;

const Validator = require("../src/");
var Validator = require("../src");
Copy link

@rajitha1998 rajitha1998 Jan 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using const makes the most sense here. Since we don't want to overwrite the Validator variable which contains the library that has been imported. Is there any reason that it has to be changed to var @UdeshUK .

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that makes sense. I'll revert it back.

@ThatUdeshUK
Copy link
Author

@rajitha1998 Reverted the validator import to a const

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

Successfully merging this pull request may close these issues.

2 participants