🤝 Shared with me (#71)

* 🚧 #46 Shared with me
  - added converter of DriveFile to dto with user information
  - updated version of jest to the latest for better compatibility with typescript and mocking class instances
  - added run configuration for unit tests

Co-authored-by: Romaric Mourgues <rmourgues@linagora.com>
This commit is contained in:
Anton Shepilov
2023-06-09 14:37:15 +02:00
committed by GitHub
parent f1bf507865
commit dfd25a234a
32 changed files with 3215 additions and 4560 deletions
@@ -7,7 +7,7 @@ describe("The /users API", () => {
const url = "/internal/services/users/v1";
let platform: TestPlatform;
beforeEach(async ends => {
beforeEach(async () => {
platform = await init({
services: [
"database",
@@ -26,17 +26,15 @@ describe("The /users API", () => {
"platform-services",
],
});
ends();
});
afterEach(async ends => {
afterEach(async () => {
platform && (await platform.tearDown());
platform = null;
ends();
});
describe("The GET /users/?search=... route", () => {
it("Should find the searched users", async done => {
it("Should find the searched users", async () => {
const testDbService = new TestDbService(platform);
await testDbService.createCompany(platform.workspace.company_id);
const workspacePk = {
@@ -122,7 +120,6 @@ describe("The /users API", () => {
resources = await search("rbs@tdrive.app", uuidv1());
expect(resources.length).toBe(0);
done();
}, 1200000);
});