Skip to content

Commit

Permalink
test(description): update tests on descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiSaba committed Feb 14, 2024
1 parent 94ad7d5 commit 7e4cbc2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/test/description.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ describe('Full schema', () => {
expect(french).toMatch(frenchDescription)
})
test('Render schema', () => {
const englishSchema = renderJsonSchema(fullSchema, 'en')
const frenchSchema = renderJsonSchema(fullSchema, 'fr')
const englishSchema = renderJsonSchema('en', fullSchema)
const frenchSchema = renderJsonSchema('fr', fullSchema)
expect(englishSchema).toMatchObject({ description: englishDescription })
expect(frenchSchema).toMatchObject({ description: frenchDescription })
})
Expand All @@ -54,8 +54,8 @@ describe('Schema without description', () => {
expect(french).toMatch(frenchDescription)
})
test('Render schema', () => {
const englishSchema = renderJsonSchema(schemaWithoutDescription, 'en')
const frenchSchema = renderJsonSchema(schemaWithoutDescription, 'fr')
const englishSchema = renderJsonSchema('en', schemaWithoutDescription)
const frenchSchema = renderJsonSchema('fr', schemaWithoutDescription)
expect(englishSchema).toMatchObject({ description: englishDescription })
expect(frenchSchema).toMatchObject({ description: frenchDescription })
})
Expand All @@ -69,8 +69,8 @@ describe('Schema without descriptions', () => {
expect(french).toMatch(description)
})
test('Render schema', () => {
const englishSchema = renderJsonSchema(schemaWithoutDescriptions, 'en')
const frenchSchema = renderJsonSchema(schemaWithoutDescriptions, 'fr')
const englishSchema = renderJsonSchema('en', schemaWithoutDescriptions)
const frenchSchema = renderJsonSchema('fr', schemaWithoutDescriptions)
expect(englishSchema).toMatchObject({ description })
expect(frenchSchema).toMatchObject({ description })
})
Expand All @@ -84,8 +84,8 @@ describe('Nested schemas', () => {
expect(french).toMatch(frenchDescription)
})
test('Render schema', () => {
const englishSchema = renderJsonSchema(nestedSchemas, 'en')
const frenchSchema = renderJsonSchema(nestedSchemas, 'fr')
const englishSchema = renderJsonSchema('en', nestedSchemas)
const frenchSchema = renderJsonSchema('fr', nestedSchemas)
expect(englishSchema).toMatchObject({
description: englishDescription,
items: [{ description: englishDescription }, { description: englishDescription }],
Expand Down

0 comments on commit 7e4cbc2

Please sign in to comment.