Skip to content

Commit

Permalink
test(dicts): update COBUILD test
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed Mar 4, 2019
1 parent 8256e63 commit 35bf447
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions test/specs/components/dictionaries/cobuild/engine.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,10 @@ describe('Dict/COBUILD/engine', () => {

it('should parse result correctly', () => {
const profile = getDefaultProfile() as ProfileMutable
profile.dicts.all.cobuild.options = {
sentence: 4
}
return retry(() =>
search('love', getDefaultConfig(), profile, { isPDF: false })
.then(searchResult => {
expect(searchResult.audio).toHaveProperty('us', expect.stringContaining('mp3'))
expect(searchResult.audio).toHaveProperty('uk', expect.stringContaining('mp3'))

const result = searchResult.result
expect(typeof result.title).toBe('string')
expect(typeof result.level).toBe('string')
// rating has been removed
// expect(typeof result.star).toBe('number')
expect(result.defs).toHaveLength(4)
expect(result.prons).toHaveLength(2)
expect(searchResult.result).toBeTruthy()
})
)
})
Expand Down

0 comments on commit 35bf447

Please sign in to comment.