Skip to content

[BUG] HTML and LCOV reporter always attempt to open a browser #978

@esatterwhite

Description

@esatterwhite

Is there an existing issue for this?

  • I have searched the existing issues

Have you read the CONTRIBUTING guide on posting bugs, and CODE_OF_CONDUCT?

  • yes I read the things

This issue exists in the latest tap version

  • I am using the latest tap

Description

In previous versions of tap, when using the html, or lcov coverage reporters, it was possible to prohibit the automatic opening of a browser with the --no-browser flag or broswer: false in a taprc configuration. In tap 18+ that option seems to have been removed and the html and lcov reporters always attempt to open a browser.

Additionally, There are cases when the application it opens is not the default browser. For example, I have an application called openlens (not a browser) installed in addition to firefox and chromium, and when tap generates an html report, it is attempting to open the openlens application.

Reproduction

This is the tap configuration in package.json I am using.

  "tap": {
    "timeout": 180,
    "output-file": ".tap-report",
    "show-full-coverage": true,
    "allow-incomplete-coverage": true,
    "coverage-report": [
      "html",
      "text",
      "text-summary",
      "json",
      "json-summary"
    ],
    "files": [
      "test/unit",
      "test/integration"
    ]
  }

Environment

which tap: no tap
npm ls tap: 
search-conformance-job@0.0.0 /home/esatterwhite/dev/js/logdna/search-conformance-job
└── tap@18.6.1
tap versions
tap: 18.6.1
"@tapjs/config": 2.4.14
"@tapjs/core": 1.4.6
"@tapjs/run": 1.4.16
"@tapjs/stack": 1.2.7
"@tapjs/test": 1.3.17
tap-parser: 15.3.1
tap-yaml: 2.2.1
tcompare: 6.4.5
plugins:
  "@tapjs/after": 1.1.17
  "@tapjs/after-each": 1.1.17
  "@tapjs/asserts": 1.1.17
  "@tapjs/before": 1.1.17
  "@tapjs/before-each": 1.1.17
  "@tapjs/filter": 1.2.17
  "@tapjs/fixture": 1.2.17
  "@tapjs/intercept": 1.2.17
  "@tapjs/mock": 1.2.15
  "@tapjs/node-serialize": 1.2.6
  "@tapjs/snapshot": 1.2.17
  "@tapjs/spawn": 1.1.17
  "@tapjs/stdin": 1.1.17
  "@tapjs/typescript": 1.3.6
  "@tapjs/worker": 1.1.17
tap config list

# vim: set filetype=yaml :

# from package.json
allow-incomplete-coverage: true
coverage-report:
  - lcov
  - text
  - text-summary
  - json
  - json-summary
files:
  - test/unit
  - test/integration
output-file: .tap-report
show-full-coverage: true
timeout: 180

# env, cli, and defaults
color: true
exclude:
  - "**/@(fixture*(s)|dist)/**"
include:
  - "**/@(test?(s)|__test?(s)__)/**/*.@(js|cjs|mjs|tap|cts|jsx|mts|ts|tsx)"
  - "**/*.@(test?(s)|spec).@(js|cjs|mjs|tap|cts|jsx|mts|ts|tsx)"
  - "**/test?(s).@(js|cjs|mjs|tap|cts|jsx|mts|ts|tsx)"
jobs: 5
reporter: base
snapshot-clean-cwd: true
tap plugin list

@tapjs/after
@tapjs/after-each
@tapjs/asserts
@tapjs/before
@tapjs/before-each
@tapjs/filter
@tapjs/fixture
@tapjs/intercept
@tapjs/mock
@tapjs/node-serialize
@tapjs/snapshot
@tapjs/spawn
@tapjs/stdin
@tapjs/typescript
@tapjs/worker
uname -a

Linux ronin 5.10.194-1-MANJARO #1 SMP PREEMPT Sat Sep 2 20:55:57 UTC 2023 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    approved featurea feature that is a good idea and will be accepted, but might not yet be planned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions