qunitjs / js-reporters

📋 Common Reporter Interface (CRI) for JavaScript testing frameworks.
MIT License
60 stars 18 forks source link

events details types #30

Closed leobalter closed 8 years ago

leobalter commented 9 years ago

On the README doc I miss the types for the event details, so I'm assuming:

Should we have an status total as well?

jzaefferer commented 9 years ago

errors is an array of Error objects with (optional?) additional properties, see later part of https://github.com/js-reporters/js-reporters/issues/12#issuecomment-120483356 - need to add that to the spec.

jzaefferer commented 9 years ago

For Suite:

jzaefferer commented 9 years ago

@fcarstens your help getting this into the spec would be much appreciated!

jzaefferer commented 8 years ago

Btw. the current draft was partially developed in this Google Doc, might still be useful: https://docs.google.com/document/d/1E9X90ODgnMW8bTssIAkfRIQiGX0n0FaGI1vk3geviIs/edit?usp=sharing

jzaefferer commented 8 years ago

Also need to add fullName

flore77 commented 8 years ago

I have noticed now this Suite property:

status: object: failed, number skipped, number passed number

Currently status is only a string with values: failed, passed and skipped.

We could make an object with the following properties:

var details = {
status: String,
passed: Number,
failed: Number,
skipped: Number
total: Number
};

The suite property could be called details, status will be a string representing the summarized status, all tests passed, or at least one failed etc, and the other properties will give a proper report of how many passed, how many failed etc.

I think it is valuable information, what do you think @jzaefferer

jzaefferer commented 8 years ago

Making status a string, consistent with Test.status makes sense.

As for the other properties, nesting them seems fine as well. Though details isn't very useful. Since we're counting tests, maybe something like testCounts?

flore77 commented 8 years ago

Sounds cool. So we could strap out of the nesting, the status prop, so we will have:

var Suite = {
  name: String,
  ...
  status: String,
  testCounts: {
    passed: Number,
    failed: Number,
    skipped: Number,
    total: Number
  }
};
flore77 commented 8 years ago

The testCounts property will count also the tests of the childSuites.

flore77 commented 8 years ago

Fixed by #84 and #85.