Closed JoseCrz closed 1 year ago
Hey @JoseCrz! So sorry for not replying till now (4 months later! 😩). This project's text is tricky and the description I'd put in wasn't very clear - so I kept getting lost in it, losing track, and then not responding.
However, in the test following this one, the expected result is different doesn't follow this pattern. On line 48 we have:
[["ab de", "abc def"], { width: 5 }, [["ab de"], ["abc ", "def "]]],
I don't see how that doesn't follow the pattern?
"ab de"
has 5 characters total: "ab" + " " + "de"
."abc "
has 5 characters total: "abc" + " "
.
"abc def"
would have been 7 characters, so it can't combine "abc"
and "def"
."def "
has 5 characters total: "def" + " "
.Am I missing something?
As an apology for taking so long (and because I think it's useful), #256 adds some more details to the README.md
Bug Report Checklist
main
branch of the repository.Expected
Some tests should pass based on the project's specification, examples and other tests results.
Actual
Some tests fail due to the expected result being incorrect.
Impacted Project
Arrays -> Text Processor
Additional Info
In
projects/arrays/text-processor/src/index.test.ts
there are some inconsistencies in the tests expected results.For example:
On the test case at lines 31 to 38 we have:
We can see that the first element of the texts array
"ab de"
gets split in the expected result:["ab ", "de "],
.This is also true for the immediate next test at lines 39 to 47
We can see the first element of the text array
"ab de"
also gets split in the expected result:["ab ", "de "]
.However, in the test following this one, the expected result is different doesn't follow this pattern. On line 48 we have:
In this case, the first element of the text array
"ab de"
doesn't get split, instead we have that its corresponding expected result is["ab de"]
which differs from the previous test cases and ,to my understanding, also differs from the specification of this project.A gave a quick look an this "inconsistencies" also appear in more test cases like the test on line 49:
test on line 66:
or tests at lines 73 to 77
These "inconsistencies" as I'm calling them right now, in turn make some tests fail which I believe shouldn't.
I re-read the project description and specification a couple times but couldn't find anything that suggested this behavior was expected/intentional. An apologize in advance if my reading comprehension baamboozled me.