-
Notifications
You must be signed in to change notification settings - Fork 73
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
Jest doesn't exit test cases automatically. #67
Comments
Have you tried to call the done method ? const createData = require("../index.js");
const SequelizeMock = require("sequelize-mock");
const dbMock = new SequelizeMock();
const mockData = require('./mock');
describe("Create Data", () => {
it("Should create data in sequelize", async done => {
try {
const result = await createData(mockData);
expect(result).toBeDefined();
} catch (err) {
expect(err).toBeNull();
}
done();
});
}); |
can you please what is in mockData? |
this is my test.js using jest this is my sequelize model which i am trying to mock here is my decribe of jest i am getting error as below while mocking with sequelize-mock
FAIL server/test/function.test.js
Test Suites: 1 failed, 1 total anyone able to help please do |
I am also getting the same type of error. |
You will have to jest.mock you car model the same way you did cartype model. |
Hey folks,
here's my configuration:
Here is my test case:
The test case passes, but jest console returns:
Jest did not exit one second after the test run has completed.
It might be something I missed from the tutorial.
Any pointers?
Let me know if I missed something above, I'll share it asap.
The text was updated successfully, but these errors were encountered: