-
-
Notifications
You must be signed in to change notification settings - Fork 113
Create Tests parameters and procedures. #417
Comments
I'd like to help out. |
Hey @ZaynMalloc Tks for your interest! Do you have experience with Mocha.JS ? |
Yes |
Ok so the best approach is if you can, please PR the initial Mocha setup and will start building the tests from there. I you want to start boldly you can already propose the basics CRUDS tests! |
thanks, I'm working on it right now |
I cloned the repo. When I run npm run dev, I get an error, and I am stuck at the "Loading the application, please hold on page".
|
hey @ZaynMalloc Zach |
Congratulations for your fist merge with us! Good Work! So lets continue ? Can you create the CRUD |
Ok, I'll continue |
Any help that you need please contact me ! @ZaynMalloc |
I'm having some problems. I am writing tests for the /api/user endpoint. I keep on getting 403 errors. How do I bypass authentication for testing?
|
@ZaynMalloc thats a good question... And a complex answer... What happens is the desired behavior since express uses passport as midleware. So what we need to do is a step back and made a little more work at setup. Again tks for the hard work ! |
on time @ZaynMalloc |
@ZaynMalloc news? Can I help some way? |
Tks for your PR! @ZaynMalloc. |
Yes, I will continue. |
I am trying to add fixtures to seed data for testing. I am using the pow-mongodb-fixtures module (https://www.npmjs.com/package/pow-mongoose-fixtures).
fixture.js
Schema: user.model.js:
Basically, my problem is that I do not know how to insert data in the GoogleSelectedCalendars since the GoogleSelectedCalendars field has a nested schema. |
I was trying to test the model by the way.
|
this field is array of this o bject { calendarId: { form: String, required: true, unique: true } } |
I changed fixture.js
However, I keep on still getting the same error.
I think I need to compile a model for GoogleSelectedCalendarsSchema to export as GoogleSelectedCalendar, create a fixture for the GoogleSelectedCalendar model and then insert data for GoogleSelectedCalendars field in User, but I am do not know how to. |
@ZaynMalloc I doesn't have a profound knowledge of tests behavior but give me a few days to make some research and I back to you! |
thanks |
@ZaynMalloc what about take another direction using https://facebook.github.io/jest/ ? |
Thanks, I'll look into that |
@ZaynMalloc the big deal about jest is the ability to test state. so we can emulate the screen behavior and make a better UX! So im using that at my professional side now! |
I'm having trouble with jest. I get the error.
My test which are in the _tests_ folder
.babelrc file
|
I will back for you ASAP @ZaynMalloc |
@jrogatis Thanks! |
@jrogatis I solved it |
Cool @ZaynMalloc !!! |
No description provided.
The text was updated successfully, but these errors were encountered: