Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

Unexpected value of suite.fullUrl on Windows #904

@generalov

Description

@generalov

Output of gemini --version:
5.6.2

I've noted that html-reporter plugin produces data.json which contains invalid value in metaInfo.url property on Windows:

metaInfo: {
  url: "\\\\user\\profile.html\\",
}

Expected:

metaInfo: {
  url: "/user/profile.html",
}

The plugin uses value from suite.fullUrl to put in the report. Root cause of the issue is in

_mkFullUrl(suiteUrl) {
const rootUrl = this._config.rootUrl;
const urlObj = url.parse(rootUrl + '/' + suiteUrl);
return path.resolve(path.normalize(urlObj.path));
}

The _mkFullUrl() function calls Node.js path module. But the module is intended to deal with filesystem paths rather URLs. It could return unexpected results on *nix systems too.

Perhaps url-join package or something like that could be used to concatenate URLs correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions