Skip to content

Commit

Permalink
feat: more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Codeprinz-1 committed May 15, 2023
1 parent 2828ff5 commit ce70049
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/collection.assert.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import type { Collection, Filter, ObjectId, WithId } from 'mongodb'
import type {
Collection,
DeleteOptions,
DeleteResult,
Filter,
ObjectId,
WithId,
} from 'mongodb'
import * as ta from 'type-assertions'
import type { TsCollection, TsReadCollection } from './collection'
import type { TsFilter, TsFindOneAndDeleteOptions } from './types'
Expand Down Expand Up @@ -63,3 +70,17 @@ ta.assert<
>
>
>()

ta.assert<
ta.Not<
ta.Extends<
TsReadCollection<TSchema>,
{
deleteOne(
filter: TsFilter<TSchema>,
options?: DeleteOptions
): Promise<DeleteResult>
}
>
>
>()

0 comments on commit ce70049

Please sign in to comment.