You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem occurs because the crud-module/templates/tests/server/_.server.routes.tests.js file refers to a variable named <%= camelizedPluralName %>GetRes on line 89 but in the function definition on line 82 the argument is named : camelizedSingularName %>sGetErr. For most English nouns this problem will go undetected, however in the case of Superheroes (and other plural nouns that don't end in 's') the test defines a function argument of SuperherosGetRes (line 82) but on line 89 refers to the correct plural variable name: SuperheroesGetRes.
The result is that the test fails and gulp does not initialise the application when executed using gulp:
$ gulp
[14:55:07] Using gulpfile ~/dev/nodejs/xmen/gulpfile.js
[14:55:07] Starting 'default'...
[14:55:07] Starting 'env:dev'...
[14:55:07] Finished 'env:dev' after 78 μs
[14:55:07] Starting 'lint'...
[14:55:07] Starting 'less'...
[14:55:08] Finished 'less' after 313 ms
[14:55:08] Starting 'sass'...
[14:55:08] Finished 'sass' after 23 ms
[14:55:08] Starting 'csslint'...
[14:55:08] Starting 'eslint'...
[14:55:08] Starting 'jshint'...
[14:55:08] Finished 'csslint' after 542 ms
modules/superheroes/tests/server/superhero.server.routes.tests.js: line 89, col 35, 'superheroesGetRes' is not defined.
1 error
[14:55:12] Finished 'eslint' after 3.86 s
[14:55:12] 'jshint' errored after 3.72 s
[14:55:12] Error in plugin 'gulp-jshint'
Message:
JSHint failed for: modules/superheroes/tests/server/superhero.server.routes.tests.js
[14:55:12] 'default' errored after 4.22 s
[14:55:12] Error in plugin 'run-sequence(jshint)'
Message:
jshint stream
[14:55:12] 'lint' errored after 4.22 s
[14:55:12] Error in plugin 'run-sequence(default)'
Message:
default callback
[14:55:12] 'lint' errored after 4.22 s
[14:55:12] Error in plugin 'run-sequence(jshint)'
Message:
jshint stream
Obviously there are other scenarios where the inflections module will fail to match the module name to the appropriate noun / plural noun, for example formulae becomes formulaes. For this specific scenario the actual template code is inconsistent and should be fixed.
The text was updated successfully, but these errors were encountered:
You fork the repo, create a branch on your repo, make your changes and commit, then create a PR from your branch on your fork to the master branch of this repo as the base.
The bug is reproducible by following the following Youtube video MeanJS - MEAN stack Yeoman Generator Tutorial from 3:47 up to 5:54.
The problem occurs because the
crud-module/templates/tests/server/_.server.routes.tests.js
file refers to a variable named<%= camelizedPluralName %>GetRes
on line 89 but in the function definition on line 82 the argument is named :camelizedSingularName %>sGetErr
. For most English nouns this problem will go undetected, however in the case of Superheroes (and other plural nouns that don't end in 's') the test defines a function argument of SuperherosGetRes (line 82) but on line 89 refers to the correct plural variable name: SuperheroesGetRes.The result is that the test fails and
gulp
does not initialise the application when executed usinggulp
:Obviously there are other scenarios where the inflections module will fail to match the module name to the appropriate noun / plural noun, for example
formulae
becomesformulaes
. For this specific scenario the actual template code is inconsistent and should be fixed.The text was updated successfully, but these errors were encountered: