Skip to content

Commit

Permalink
test(schema.select.test): clear data before test
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Oct 6, 2023
1 parent 459b8b5 commit d8e1f4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/schema.select.test.js
Expand Up @@ -26,6 +26,9 @@ describe('schema select option', function() {
afterEach(() => require('./util').stopRemainingOps(db));

it('excluding paths through schematype', async function() {
// data clearing is required for this test, because in deno some other test leaks a "_id: immutable" index
await require('./util').clearTestData(db);

This comment has been minimized.

Copy link
@vkarpov15

vkarpov15 Oct 8, 2023

Collaborator

Likely better to just drop the 'tests' collection. clearTestData() assumes that it runs after a test is done and clears all data related to models that test created.


const schema = new Schema({
thin: Boolean,
name: { type: String, select: false },
Expand Down

0 comments on commit d8e1f4f

Please sign in to comment.