Skip to content

Commit

Permalink
test: imrpove catharsis transform coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Feb 13, 2022
1 parent 44f199d commit 6ff1ebf
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/catharsisTransform.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { expect } from 'chai'

import { RootResult } from '../src/result/RootResult'
import { catharsisTransform } from '../src/transforms/catharsisTransform'

describe('transform', () => {
it('Gets tranform for suffixed `JsdocTypeVariadic`', () => {
const expected = {
name: 'B(c...)',
type: 'NameExpression'
}
const parseResult = {
type: 'JsdocTypeSymbol',
value: 'B',
element: {
type: 'JsdocTypeVariadic',
element: {
type: 'JsdocTypeName',
value: 'c'
},
meta: {
position: 'suffix',
squareBrackets: false
}
}
}
const xform = catharsisTransform(parseResult as RootResult)
expect(xform).to.deep.equal(expected)
})
})

0 comments on commit 6ff1ebf

Please sign in to comment.