Skip to content

Moment.js test #1

@emilyannemoses

Description

@emilyannemoses

I have a question about this test:

  test('Return today\'s date in the format: May 29, 2019', () => {
    const cal = dates.calendar()
    expect(cal).toMatch(/^[A-z]{3} [0-9]{2}, [0-9]{4}$/)
  })

It's in test/index.test.js the 2nd dates test.

I think it's trying to match the month name to have 3 characters, but July for example has 4, so it will fail if the user returns any months with more characters than May

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions