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
{{ message }}
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
Create an app with the CLI and select Mocha + assert
feathers g app
? Project name new-test-app
? Description
? What folder should the source files live in? src
? Which package manager are you using (has to be installed globally)? npm
? What type of API are you making? (Press to select, to toggle all, to invert selection)REST, Realtime via Socket.io
? Which testing framework do you prefer? Mocha + assert
Create a service with Mongoose
feathers g service
? What kind of service is it? Mongoose
? What is the name of the service? test
? Which path should the service be registered on? /test
? What is the database connection string? mongodb://localhost:27017/new_test_app
Run mocha with -w parameter
./node_modules/.bin/mocha test/ -w
Do a modification in your code
OverwriteModelError: Cannot overwrite test model once compiled.
Expected behavior
We should not have an exception in that case. That is due to the way models are generated by CLI.
The error is described here: Automattic/mongoose#1251
Wrapping the model creation in a try catch solves the issue.
Actual behavior
OverwriteModelError: Cannot overwrite test model once compiled.
System configuration
Module versions (especially the part that's not working):
Feathers CLI 3.9.0
NodeJS version:
v10.14.2
Operating System:
Any
Browser Version:
N/A
React Native Version:
N/A
Module Loader:
N/A
The text was updated successfully, but these errors were encountered:
Steps to reproduce
feathers g app
feathers g service
./node_modules/.bin/mocha test/ -w
Expected behavior
We should not have an exception in that case. That is due to the way models are generated by CLI.
The error is described here: Automattic/mongoose#1251
Wrapping the model creation in a try catch solves the issue.
Actual behavior
System configuration
Module versions (especially the part that's not working):
Feathers CLI 3.9.0
NodeJS version:
v10.14.2
Operating System:
Any
Browser Version:
N/A
React Native Version:
N/A
Module Loader:
N/A
The text was updated successfully, but these errors were encountered: