Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
test: add allowUnionTypes: true option
Browse files Browse the repository at this point in the history
  • Loading branch information
nogic1008 committed Aug 12, 2022
1 parent 294cb28 commit 34ca8c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/content/json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const readFileAsync = promisify(readFile)
const statAsync = promisify(stat)

describe('/content', () => {
const validate = new Ajv().compile(songSchema)
const validate = new Ajv({ allowUnionTypes: true }).compile(songSchema)
const seriesFolders = readdirSync(dirPath)

describe.each(seriesFolders)('/%s', (series) => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/public/song-schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { describe, expect, test } from 'vitest'
import songSchema from '~~/public/song-schema.json'

describe('/public/song-schema.json', () => {
const validator = new Ajv()
const validator = new Ajv({ allowUnionTypes: true })
test('should be valid json-schema', () => {
expect(validator.validateSchema(songSchema)).toBeTruthy()
})
Expand Down

0 comments on commit 34ca8c5

Please sign in to comment.