CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

utils pushToMethods invokes getters

Open ogiexela opened this issue 3 years ago • 1 comments

https://github.com/codeceptjs/CodeceptJS/blob/29c9fc942ae43996da2c469308afbb8b99ceeda1/lib/utils.js#L82

This should check if the property is a getter before trying to access it otherwise the getter gets invoked twice here.

const Helper = require('@codeceptjs/helper');

class MyHelper extends Helper {

  get foo() {
    console.log('bar')
  }

}

module.exports = MyHelper;

ogiexela avatar Apr 05 '22 20:04 ogiexela

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Dec 15 '23 02:12 github-actions[bot]