Ask questionsNot possible to pass a value to `level` that is valid in TypeScript

The problem

It's not possible to pass a value to level that is valid in TypeScript, since LEVELS enum is not exported.



Possible ideas to fix this problem:

  • Expose the constants
  • Use this pattern

Code To Reproduce Issue

import ReportPortalReporter from 'wdio-reportportal-reporter';
ReportPortalReporter.sendLogToTest('foobar', 'INFO');

Answer questions caiogondim

I don't think it is good to expose all constants because there are a lot of internal things - so we need to extact logs level somehow.

I agree with that. But in the case for LEVELS it's external, so maybe it makes sense to export it. I will push a PR.


Related questions

I have been using the latest version of reporter and service but I'm getting an error when I run my test suit: hot 1
Github User Rank List