Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed May 13, 2024
1 parent 17e1ecb commit 713c9ba
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/types/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1503,5 +1503,11 @@ function gh13772() {
};
const schema = new Schema(schemaDefinition);
type RawDocType = InferRawDocType<typeof schemaDefinition>;
expectAssignable<{ name?: string, docArr?: Array<{ name?: string }> }>({} as RawDocType);
}
expectAssignable<
{ name?: string | null, docArr?: Array<{ name?: string | null }> }
>({} as RawDocType);

const TestModel = model('User', schema);
const doc = new TestModel();
expectAssignable<RawDocType>(doc.toObject());
}

0 comments on commit 713c9ba

Please sign in to comment.