Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testCompleted event should contain file path #371

Open
razzeee opened this issue Jul 15, 2019 · 1 comment
Open

testCompleted event should contain file path #371

razzeee opened this issue Jul 15, 2019 · 1 comment

Comments

@razzeee
Copy link

razzeee commented Jul 15, 2019

If I run elm-test --report json elm-test will find all files in my test folder and run them.

Unfortunatly the testCompleted event, doesn't let us know which file it is from.

{
  "event": "testCompleted",
  "status": "fail",
  "labels": [
    "RoutingTests",
    "Route.fromUrl",
    "Parsing hash: \"#login\""
  ],
  "failures": [
    {
      "given": null,
      "message": "Expect.equal",
      "reason": {
        "type": "Equality",
        "data": {
          "expected": "Just Login",
          "actual": "Nothing",
          "comparison": "Expect.equal"
        }
      }
    }
  ],
  "duration": "3"
}
@andys8
Copy link
Contributor

andys8 commented Jul 16, 2019

Can the file name be extracted from the first label? Is it safe to do so? Thanks.

elmRoot + "/tests/" + output.labels[0].replace(/\./g, '/') + ".elm"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants