In my component test I'm trying to use a custom as...
# help
f
In my component test I'm trying to use a custom assertion, so I put this into commands.ts:
Copy code
typescript
chai.use(chaiHelper => {
    chaiHelper.Assertion.addChainableMethod('have.trimmed.text', function (expected: string) {
but when my chain calls
should('have.trimmed.text', '...')
I'm getting an error saying that the trimmed chainer was not found. I also put this into /cypress/index.d.ts:
Copy code
typescript
declare namespace Cypress {
    interface Chainer<Subject> {
        (chainer: 'have.trimmed.text', expected?: string): Chainable<Subject>
    }
}