Open mliao95 opened 6 years ago
Your original thought is correct; countReset()
should only reset the label default
, or display a warning if a count with that label was never started. The test is wrong, thanks for catching this! Going to leave tis open until I take care of it. But yeah, per specification (see IDL for default label value), the label should default to default
, and attempt to reset counts with that label.
Originally, I thought
console.countReset()
should reset the 'default' label similar to howconsole.count()
increments the 'default' counter. However, the w3c standard forconsole.countReset()
demonstrates that callingconsole.countReset()
afterconsole.count("a label")
will reset the "a label" label.It still remains ambiguous whether the behavior for
console.countReset()
with no arguments is to reset the most recent label or reset all labels. Personally, it seems that resetting every label or resetting the default label (although it doesn't pass the w3c test) makes the most sense. Let me know what you all think.