[Poetry Club Door Policy] Add test

Could we add a test for frontDoorPassword task in Poetry Club Door Policy? None of the current tests check for a case where the input has a lowercase first letter. The instructions do say frontDoorPassword('shire');, but this isn’t there in the tests, leading to a mentee of mine to (unintentionally) omit . toUpperCase

Yes, we’ll accept a PR to add or change the tests here:

describe('front door password', () => {
  test('should capitalize SUMMER', () => {

  test('should capitalize SOPHIA', () => {

  test('should capitalize CODE', () => {

Perhaps it suffices to make Sophia lowercase and code mixed case?

Yep, mixing up the cases would be enough - only I thought tests were immutable. Is that only for problem-specifications?

The PR - I’ve mixed up the cases instead of adding a test. The tests now also check that Code returns Code, and that sophia returns Sophia.

That’s right.

Thank you very much! Merged :smiley:

1 Like