-
Notifications
You must be signed in to change notification settings - Fork 94
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
style(core): modify camelize error message #177
base: master
Are you sure you want to change the base?
Conversation
File name can not be a pure number. If so, egg-core will throw an exception with a regular expression matching message which is confused.
test/loader/file_loader.test.js
Outdated
@@ -225,7 +225,7 @@ describe('test/loader/file_loader.test.js', () => { | |||
directory: path.join(dirBase, 'error/dotdir'), | |||
target: mod, | |||
}).load(); | |||
}, /dot.dir is not match 'a-z0-9_-' in dot.dir\/a.js/); | |||
}, 'dot.dir is not match \'^[a-z][a-z0-9_-]*$\' in dot.dir\/a.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be reg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well done
Codecov Report
@@ Coverage Diff @@
## master #177 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 18 18
Lines 958 958
=====================================
Hits 958 958
Continue to review full report at Codecov.
|
@@ -235,13 +235,13 @@ describe('test/loader/file_loader.test.js', () => { | |||
directory: path.join(dirBase, 'error/underscore-dir'), | |||
target: mod, | |||
}).load(); | |||
}, /_underscore is not match 'a-z0-9_-' in _underscore\/a.js/); | |||
}, '_underscore is not match \'^[a-z][a-z0-9_-]*$\' in _underscore\/a.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line should be regexp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @army8735
Checklist
npm test
passesAffected core subsystem(s)
Description of change
File name can not be a pure number.
If so, egg-core will throw an exception with a regular expression matching message which is confused.