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

Can't use mocha_test on non-root packages #37

Closed

Description

@driveraid

Hi @pcj, I think I found an issue with mocha_test. It appears it doesn't work for packages deeper than the workspace root.

To reproduce, simply:

$ cd tests/mocha
$ mkdir W
$ mv BUILD test.js W
$ bazel test //...

It appears the mocha launcher doesn't take the leading path into account. Please see the attachment for a solution which I verified is working both for the base package and deeper ones.

0001-Make-sure-mocha_test-can-be-used-on-other-packages-t.patch.txt

Activity

  1. xujihui1985 commented on Oct 24, 2017

    @xujihui1985
    Contributor

    @driveraid this issue should has been fixed #39

  2. cwoodcock commented on Oct 25, 2017

    @cwoodcock

    Just ran into this using head @ f990afc. Seems #41 accidentally added a regression. Backing the truck up to dc9f8ba worked around it for me. cc @pcj

  3. pcj commented on Oct 25, 2017

    @pcj
    Contributor

    Shucks, sorry about that. #41 was a big change. I'll take a look at this tonight.

  4. pcj commented on Oct 26, 2017

    @pcj
    Contributor

    Should be fixed by #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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