Tests shown under wrong block in spec reporter
See original GitHub issueThe “Spec” Reporter is showing my tests under the wrong describe block
I have 5 test files in 2 directories under my test folder: attributes
and events
.
All tests are using async/await
How do I start rooting this out???
Describe Blocks (in alphabetical folder/file order):
attributes/day-format.test.js
describe('CalendarElement (<calendar-element></calendar-element>)', () => {
describe('Attributes', () => {
describe('.dayFormat', () => {
...
})
});
});
attributes/header-format.test.js
describe('CalendarElement (<calendar-element></calendar-element>)', () => {
describe('Attributes', () => {
describe('.headerFormat', () => {
...
})
});
});
attributes/header-style.test.js
describe('CalendarElement (<calendar-element></calendar-element>)', () => {
describe('Attributes', () => {
describe('.headerStyle', () => {
...
})
});
});
attributes/label-format.test.js
describe('CalendarElement (<calendar-element></calendar-element>)', () => {
describe('Attributes', () => {
describe('.labelFormat', () => {
...
})
});
});
attributes/selected-date.test.js
describe('CalendarElement (<calendar-element></calendar-element>)', () => {
describe('Attributes', () => {
describe('.selectedDate', () => {
...
})
});
});
events/date-change.test.js
describe('CalendarElement (<calendar-element></calendar-element>)', () => {
describe('Events', () => {
describe('.date-change', () => {
...
})
});
});
Reported Results:
CalendarElement (<calendar-element></calendar-element>)
Attributes
.labelFormat
✔ is EEEE by default
✔ is is bound to the `label-format` attribute
when a valid format is entered
✔ is reset back to default
when an invalid format is entered
✔ is reset back to default
✔ Logs a RangeError
.headerStyle
✔ is an empty string by default
✔ is is bound to the `header-style` attribute
✔ is cooerced to an unvalidated string
✔ is rendered in the section header
.headerFormat
✔ is MMMM yyyy by default
✔ is is bound to the `header-format` attribute
when a valid format is entered
✔ is reset back to default
when an invalid format is entered
✔ is reset back to default
✔ Logs a RangeError
Events
date-change
✔ is fired when .selectedDate changes
Properties
.bubbles
✔ is true
.composed
✔ is true
.cancelable
✔ is true
.detail
✔ is an object
Properties
value
when .selectedDate is set
✔ is a String
✔ is the current .selectedDate in ISO 8601 format (yyyy-MM-dd)
when .selectedDate is unset
✔ is null
date
when .selectedDate is set
✔ is a Date
✔ is the current .selectedDate
when .selectedDate is unset
✔ is null
/***** EVERYTHING BELOW IS SUPPOSED TO BE IN THE `Attributes` BLOCK *****/
.selectedDate
✔ is empty by default
✔ is is bound to the `selected-date` attribute
✔ is set by clicking a date cell
when an invalid date is entered
✔ sets the value to NULL
✔ Logs the invalid date as an Error
.dayFormat
✔ is d by default
✔ is is bound to the `day-format` attribute
when a valid format is entered
✔ is reset back to default
when an invalid format is entered
✔ is reset back to default
✔ Logs a RangeError
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
reporter "wdio-spec-reporter" is not installed · Issue #1129
Following the 4.x I get this error while trying to use the spec ... Failing tests will be displayed the same way like...
Read more >Summarize protractor results over multiple spec files
Each spec file has an average of one "describe" block, each usually having multiple "it" blocks. I'm currently using jasmine-spec-reporter which ...
Read more >Jasmine Spec Report - Reports #1 | Protractor Tutorial | LetCode
Reporting is very essential in the world of testing, let us start with very basic by using the Jasmine Spec Reporter.
Read more >Mocha documentation — DevDocs
If you use callback-based async tests, Mocha will throw an error if ... and flag tests that are slow (default: 75ms), as shown...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you’re running with karma, you’re using karma’s reporter, not mocha…
Would be nice if this wasn’t completely ignored