Convert sql file to array of queries
npm i sql-to-queries-array
You can use it with either with one SQL file or directory.
const arr = await sqlToArray(pathToFile);
If you need to include only some names of files you shold add that base name, for example release
as second param.
const arr = await sqlToArray(pathToDirectory, nameOfExpectedFiles);
npm run test