Skip to content

Commit 30888e3

Browse files
committed
test: fix typescript tests
1 parent ce66e23 commit 30888e3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/types/maps.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@ function gh13755() {
8383

8484
const TestModel = model('Test', testSchema);
8585
const doc = new TestModel();
86-
expectType<Map<string, string> | undefined>(doc.instance);
86+
expectType<Map<string, string> | undefined | null>(doc.instance);
8787
}

test/types/models.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,9 +744,9 @@ function gh13957() {
744744
}
745745

746746
interface ITest {
747-
name?: string
747+
name: string
748748
}
749-
const schema = new Schema({ name: String });
749+
const schema = new Schema({ name: { type: String, required: true } });
750750
const TestModel = model('Test', schema);
751751
const repository = new RepositoryBase<ITest>(TestModel);
752752
expectType<Promise<ITest[]>>(repository.insertMany([{ name: 'test' }]));

0 commit comments

Comments
 (0)