ioBroker/testing

test-and-release fails for wwwOnly adapters

mcm1957 opened this issue · 2 comments

If an adapter declares '"onlyWWW": true,' then the tests should not fail with error if no 'main' attribute exists within package.json.

Adapter checker seems to handle this correctly.

Example:
https://github.com/iobroker-community-adapters/ioBroker.icons-smarthome

  1) Validate the package files
       Check contents of package.json
         The property "main" exists:
     AssertionError: expected undefined not to be undefined
      at Context.<anonymous> (node_modules/@iobroker/testing/build/tests/packageFiles/index.js:61:57)
      at process.processImmediate (node:internal/timers:476:21)

Workarounds:

  • declare a dummy main (i.e. main:README.md)
  • manipulate test-and-release.yml

Both options are suboptimal. The satndard test environment should be able to handle this.

@AlCalzone
Do you have any spare time to add this exception to standard tests?
Or would this be more effort than I guess.

should be solved by PR #594