You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There have been multiple issues filed around this idea already, namely #175, #149 and #163.
The problem is that if the describe is the same for two or more files–particularly if they are in the same directory–(so I probably need to do more testing) the last test to run is the test that gets recorded in the final output file whether or not the files are consolidated.
Example Time
let's say you have two files in the same directory that both have this line of code: describe('foo'...
If consolidateAll is set to true, only the tests that were in the last file ran will report for the suite foo.
If consolidateAll is set to false, there will only be one file generated, ignoring prefixes, suffixes and modifySuiteName.
The solution would be to keep track of the suites that have already been logged and if there are more tests that belong to that suite add them in the correct place in the xml output. This might be a bit tricky to figure out file names when consolidateAll is set to false and may require a bit more thought.
The use case I think I can solve is if people are trying to use describe to set up test suites across files by using the same text inside describe.
My proposal would be to add logic to do what I've described above which would be based on a flag called something like groupSameDescribesAcrossFilesIntoSingleTestSuite or something like that.
Comments, Criticisms and general discussion are encouraged.
NOTE: I'm filling a GitHub issue so that the world can work on this problem, but I have forked the repo with the thought of making the modification myself. When I actually sit down to work on the code, I'll add a comment to this issue. If someone beats me to the punch, please comment on this issue.
The text was updated successfully, but these errors were encountered:
There have been multiple issues filed around this idea already, namely #175, #149 and #163.
The problem is that if the
describe
is the same for two or more files–particularly if they are in the same directory–(so I probably need to do more testing) the last test to run is the test that gets recorded in the final output file whether or not the files are consolidated.Example Time
let's say you have two files in the same directory that both have this line of code:
describe('foo'...
If
consolidateAll
is set totrue
, only the tests that were in the last file ran will report for the suitefoo
.If
consolidateAll
is set tofalse
, there will only be one file generated, ignoring prefixes, suffixes andmodifySuiteName
.The solution would be to keep track of the suites that have already been logged and if there are more tests that belong to that suite add them in the correct place in the xml output. This might be a bit tricky to figure out file names when
consolidateAll
is set tofalse
and may require a bit more thought.The use case I think I can solve is if people are trying to use
describe
to set up test suites across files by using the same text insidedescribe
.My proposal would be to add logic to do what I've described above which would be based on a flag called something like
groupSameDescribesAcrossFilesIntoSingleTestSuite
or something like that.Comments, Criticisms and general discussion are encouraged.
NOTE: I'm filling a GitHub issue so that the world can work on this problem, but I have forked the repo with the thought of making the modification myself. When I actually sit down to work on the code, I'll add a comment to this issue. If someone beats me to the punch, please comment on this issue.
The text was updated successfully, but these errors were encountered: