Without the code for it I'm making a guess, but as Bergi correctly pointed out, if execution stops at inMemoryDb.public.migrate
, it likely is not resolving or rejecting the Promise. Here's a guess what that might look like:
function newDb() {
return {
public: {
migrate: () => {
return new Promise((resolve, reject) => {
// does migration stuff
});
},
},
};
}
and how you might fix it:
function newDb() {
return {
public: {
migrate: () => {
return new Promise((resolve, reject) => {
try {
// does migration stuff
resolve(); // <-- important!
}
catch (error) {
reject(); // <-- important!
}
});
},
},
};
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…