My code is:
Object.keys(res.body.data).should.containEql('id')
The error that TypeScript gives me is
Property 'should' does not exist on type 'string[]'.
So how do I use should with TypeScript?
My code is:
Object.keys(res.body.data).should.containEql('id')
The error that TypeScript gives me is
Property 'should' does not exist on type 'string[]'.
So how do I use should with TypeScript?
Copyright © 2021 Jogjafile Inc.
You are missing the import of should library. Basically you need to import
import 'should'to have access to should methods.I have tested this code and it works! If I comment the import I had the same issue that you have.