I think the test means that a name can only be accepted in one grade and prevent duplicates. so typescript school.add('Aimee', 2) school.add('Aimee', 1)
should prevent the second add while accepting the first one (because it is not a duplicate) . However the test expects an empty array : expect(school.grade(2)).toEqual([])
I think it is not a real use case to delete the first entry when a duplicate is being added. what do you think ?
You are correct. This has been fixed in problem specifications uuid 6a03b61e-1211-4783-a3cc-fc7f773fba3f
but the typescript tests have not been updated.
this seems still open…
line 92 should be
expect(school.grade(1)).toEqual([])
instead of
expect(school.grade(2)).toEqual([])
is the patch as simple as this? or are there more hidden implications?
No it’s not. The tests should be in sync with the problem specs, and this probably means changes in a lot of places.
@tasx i might have been way too optimistic :-(
is there a guide/doc for developers/supporters you could point me too to help out?
in previous exercises on TS track i believe i have experienced couple more of these oddities and would like to help.