protractor-cucumber-typescript
                                
                                
                                
                                    protractor-cucumber-typescript copied to clipboard
                            
                            
                            
                        Can you please tell how do I add assertions in my step definition file?
This is the code in my step definition for assertion -- const headingtitle = element(By.css('h2')); let heading = await headingtitle.getText(); console.log(heading); expect(heading).to.be.equal('First Name'); Am facing the below error
E/launcher - Error: TypeError: Cannot read property 'expect' of undefined
at Object.
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at C:\LenderPortal-UI\node_modules\cucumber\lib\cli\index.js:142:42
at Array.forEach (
at C:\LenderPortal-UI\node_modules\cucumber\lib\cli\index.js:169:41
at Generator.next (