Skip to content

Commit

Permalink
Removed Unnecessary Test Assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
JamarTG committed Aug 6, 2023
1 parent e2f19eb commit afba51b
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions tests/utilities/removeSampleOrganizationUtil.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@ import { describe, it, beforeAll, afterAll, expect } from "vitest";
import { createSampleOrganization } from "../../src/utilities/createSampleOrganizationUtil";
import { removeSampleOrganization } from "../../src/utilities/removeSampleOrganizationUtil";
import type mongoose from "mongoose";
import {
User,
Organization,
Post,
Event,
Plugin,
SampleData,
} from "../../src/models";
import { Organization, SampleData } from "../../src/models";
import { connect, disconnect } from "../helpers/db";

let MONGOOSE_INSTANCE: typeof mongoose;
Expand All @@ -31,19 +24,8 @@ describe("Sample Organization", () => {
expect(organization).toBeDefined();

await removeSampleOrganization();

const organizationsAfterRemoval = await Organization.find();
const usersAfterRemoval = await User.find();
const postsAfterRemoval = await Post.find();
const eventsAfterRemoval = await Event.find();
const pluginsAfterRemoval = await Plugin.find();
const sampleDataAfterRemoval = await SampleData.find();

expect(organizationsAfterRemoval.length).toBe(0);
expect(usersAfterRemoval.length).toBe(0);
expect(postsAfterRemoval.length).toBe(0);
expect(eventsAfterRemoval.length).toBe(0);
expect(pluginsAfterRemoval.length).toBe(0);
expect(sampleDataAfterRemoval.length).toBe(0);
});
});

0 comments on commit afba51b

Please sign in to comment.