Skip to content

Improve Test Coverage For to as object & function #30

@majew7

Description

@majew7

Requested Update

Enhance test.js - describe('react-passage', () => {})

Provide consistent coverage for:

  • to string
  • to as location object - and pathname, search, hash, state
  • to as function and pathname, search, hash, state

Why Is This Update Needed?

The to property of React Passage's Link accepts a string, object or function which is higher complexity than just working with a url string.

Currently test.js tests are light, and do an incomplete job ensuring that Passage's Link are working correctly by retain all the relevant values pathname, search, hash, state.

Are There Examples?

One example of light coverage:
it('matches with a function that returns a location object', () => {})
The incompleteness is missing coverage to ensure state is passed through.

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