Skip to content
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

[Bugfix, #91] test now passes #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davesag
Copy link

@davesag davesag commented May 24, 2019

I found three errors in your app.

  1. In services/user.service.ts user should have been User
  2. In the test, as you did not have a .sequelizerc file and your models are not in the default location, you need to tell makeMockModels where to find the models. (I will update the readme in sequelize-test-helpers to make that clearer)
  3. For some reason (I don't know Typescript very well sorry) when you export your namespace it exports as property of the module, so instead of UserService.getUserById you need to refer to UserService.UserService.getUserById.

If interested you can read my article on why JS developers should not use TypeScript

Cheers

Dave

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.

None yet

1 participant