src/index.spec.js
async function disposable() {
  const name = "tmp" + Math.floor(Math.random() * 10000);
  await connection.dbCreate(name).run();

  const r = Object.create(connection);

  r.dispose = async function() {
    await this.dbDrop(name).run();
  };

  r._poolMaster._options.db = name;

  return r;
}
async function disposable() {
  const name = "tmp" + Math.floor(Math.random() * 10000);
  await connection.dbCreate(name).run();

  const r = Object.create(connection);

  r.dispose = async function() {
    await this.dbDrop(name).run();
  };

  r._poolMaster._options.db = name;

  return r;
}
not really disposable, no way to get an instance with a different database, too expensive to open new connection for each test, but this will still work as "intended" for single thread tests.