run all30 specs, 0 failures in 0.2sFinished at Sun Mar 16 2025 17:39:18 GMT+0000 (Coordinated Universal Time)
runFeature: Masking an Input
runScenario: Applying a mask to an already masked input
  • Given an input with two masks
  • When typing a number
  • Then value should be correct
runFeature: Getting raw value
runScenario: After typing
  • Given an input with a mask containing a literal
  • When typing all numbers
  • Then raw value should be correct
runScenario: While typing
  • Given an input with a mask containing a literal
  • When typing a number
  • Then raw value should be correct
runScenario: Before typing
  • Given an input with a mask containing a literal
  • Then raw value should be correct
runScenario: After typing partial input past an optional marker
  • Given an input with a mask containing a literal
  • When typing a partial input
  • Then raw value should be correct
runFeature: Focusing A Masked Input
runScenario: Mask starts with a placeholder
  • Given a mask beginning with a placeholder
  • When focusing
  • Then placeholder text should be correct
  • And caret position should be correct
runScenario: Mask starts with a literal
  • Given a mask beginning with a literal
  • When focusing
  • Then placeholder text should be correct
  • And caret position should be correct
runScenario: Masking a hidden input
  • Given a mask on a hidden input
  • When focusing input
  • Then should not throw an error
runFeature: Leaving A Masked Input
runScenario: All placeholders filled
  • Given a mask with two placeholders
  • When typing two characters and blurring
  • Then value should be correct
runScenario: Empty placeholders remaining
  • Given a mask with two placeholders
  • When typing one character and blurring
  • Then value should be empty
runFeature: Optional marker
runScenario: Placeholders not filled to marker
  • Given a mask with an optional marker
  • When typing one character and leaving
  • Then value should be empty
runScenario: Placeholders filled to marker
  • Given a mask with an optional marker
  • When typing two characters and leaving
  • Then value should remain
runTyping Specifications
runFeature: Backspace Key
runStory: User presses backspace with cursor to the right of a mask literal
runScenario: character at cursor matches definition to the left
  • Given an input with a mask definition of '9-99'
  • Given the input has cursor positioned to the right of literal
  • When hitting the backspace key
  • Then value should be correct
  • And caret position should be correct
runScenario: character at cursor does not match definition to the left
  • Given an input with a mask definition of 'a-99'
  • Given the input has cursor positioned to the right of literal
  • When hitting the backspace key
  • Then value should be correct
  • And caret position should be correct
runStory: User presses backspace with cursor on last character
runThere is a mask literal between the two placeholders
runScenario: character at end matches definition of first position
  • Given an input with a mask definition of '9-9'
  • Given the input has cursor positioned on literal
  • When hitting the backspace key
  • Then value should be correct
  • And caret position should be correct
runScenario: character at end does not match definition of first position
  • Given an input with a mask definition of '9-9'
  • Given the input has cursor positioned on literal
  • When hitting the backspace key
  • Then value should be correct
  • And caret position should be correct
runScenario: cursor character matches definition to the left
  • Given an input with a mask definition of '99'
  • Given the input has cursor positioned on first character
  • When hitting the backspace key
  • Then value should be correct
  • And caret position should be correct
runScenario: cursor character does not match definition to the left
  • Given an input with a mask definition of '9a'
  • Given the input has cursor positioned on first character
  • When hitting the backspace key
  • Then value should be correct
  • And caret position should be correct
runFeature: Delete Key
runStory: User presses delete with cursor on a mask literal
runScenario: character at end matches definition to the right
  • Given an input with a mask definition of '9-99'
  • Given the input has cursor positioned on literal
  • When hitting the delete key
  • Then value should be correct
  • And caret position should be correct
runScenario: character at end does not match definition to the right
  • Given an input with a mask definition of '9-9a'
  • Given the input has cursor positioned on literal
  • When hitting the delete key
  • Then value should be correct
  • And caret position should be correct
runStory: User presses delete with cursor on first character
runThere is a mask literal between the two placeholders
runScenario: character to right matches definition of current position
  • Given an input with a mask definition of '9-9'
  • Given the input has cursor positioned on first character
  • When hitting the delete key
  • Then value should be correct
  • And caret position should be correct
runScenario: character to right does not match definition of current position
  • Given an input with a mask definition of '9-9'
  • Given the input has cursor positioned on first character
  • When hitting the delete key
  • Then value should be correct
  • And caret position should be correct
runScenario: character to right matches definition of current position
  • Given an input with a mask definition of '99'
  • Given the input has cursor positioned on first character
  • When hitting the delete key
  • Then value should be correct
  • And caret position should be correct
runScenario: character to right does not match definition of current position
  • Given an input with a mask definition of '9a'
  • Given the input has cursor positioned on first character
  • When hitting the delete key
  • Then value should be correct
  • And caret position should be correct
runFeature: Escape Key
runStory: User presses escape key after typing in some changes
runScenario: mask is applied with an existing value
  • Given an input an existing value '6'
  • Given a mask definition of '9'
  • When user types something different then hits escape key
  • Then value is return to previous value
runFeature: Pasting
runScenario: When pasting a value
  • Given an input with a completed callback
  • When pasting
  • Then completed callback should be called