Skip to content

Commit

Permalink
test: address some code review comments to streamline tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Nov 2, 2022
1 parent 80f597f commit 1f6864f
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions test/types/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ export function autoTypedSchema() {
array5: any[];
array6: string[];
array7?: string[];
array8?: string[];
decimal1?: Types.Decimal128;
decimal2?: Types.Decimal128;
decimal3?: Types.Decimal128;
Expand Down Expand Up @@ -458,6 +459,7 @@ export function autoTypedSchema() {
array5: [],
array6: { type: [String] },
array7: { type: [String], default: undefined },
array8: { type: [String], default: () => undefined },
decimal1: Schema.Types.Decimal128,
decimal2: 'Decimal128',
decimal3: 'decimal128'
Expand Down Expand Up @@ -870,15 +872,3 @@ function gh12431() {
type Example = InferSchemaType<typeof testSchema>;
expectType<{ testDate?: Date, testDecimal?: Types.Decimal128 }>({} as Example);
}

function gh12420() {
const TestSchema = new Schema(
{
comments: { type: [String], default: () => undefined }
}
);

expectType<{
comments?: string[]
}>({} as InferSchemaType<typeof TestSchema>);
}

0 comments on commit 1f6864f

Please sign in to comment.