I have a ExpressJs application and unit testing with was done using Jasmine. Currently I'm using real database to run unit tests as well. But I want to do unit testing without using the real database. When I'm searching for a solution I came a cross with the concept of 'In Memory Database'. I read the mysql documentation. And it says we can create a table in memory by giving the engine as Memory
CREATE TABLE t (i INT) ENGINE = MEMORY;
Is there any possibility that I can create a Memory database and run my all unit tests by staring from creating the memory database, creating all tables and inserting data into that database in runtime by using a backedup .sql file?