Hello,
I have strange problem with fastify-sequelize in tests - fastify.close throw an exception on app.close. And I have that problem only with fastify-sequelize. I made small test and put it on github - git@github.com:mitry1974/testFSP.git
Can you help me - what is going wrong in that case?
Hello, I have strange problem with fastify-sequelize in tests - fastify.close throw an exception on app.close. And I have that problem only with fastify-sequelize. I made small test and put it on github - git@github.com:mitry1974/testFSP.git Can you help me - what is going wrong in that case?
const fastify = require('fastify'); const fastifySequelize = require('fastify-sequelize'); const config = require('../dbconfig');
let app;
beforeEach(async () => { try { app = fastify (); app.register(fastifySequelize, config); await app.ready(); } catch(e) { console.log('application start throw an error'); console.log(e); } });
afterEach(async () => { try{ await app.close(); } catch (e) { console.log('app.close throw an error'); console.log(e); } app = null; });
test('1', () => { expect(5).toBe(5); });
test('2', () => { expect(6).toBe(6); });