How to use the api/utils/testing_db.disconnect function in api

To help you get started, we’ve selected a few api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github huridocs / uwazi / app / api / csv / specs / csvLoaderLanguages.spec.js View on Github external
afterAll(async () => {
    await fileUtils.deleteFiles([
      path.join(configPaths.uploadedDocuments, 'generated1.pdf'),
      path.join(configPaths.uploadedDocuments, 'generated2.pdf'),
      path.join(configPaths.uploadedDocuments, `${imported[0]._id.toString()}.jpg`),
      path.join(configPaths.uploadedDocuments, `${imported[1]._id.toString()}.jpg`),
      path.join(configPaths.uploadedDocuments, `${imported[2]._id.toString()}.jpg`),
      path.join(configPaths.uploadedDocuments, `${imported[3]._id.toString()}.jpg`),
      path.join(configPaths.uploadedDocuments, `${imported[4]._id.toString()}.jpg`),
      path.join(configPaths.uploadedDocuments, `${imported[5]._id.toString()}.jpg`),
    ]);

    await removeTestingZip();
    await db.disconnect();
  });
github huridocs / uwazi / app / api / users / specs / users.spec.js View on Github external
afterAll((done) => {
    db.disconnect().then(done);
  });