autoNumeric: Failing unit tests on macOS with German localization

Current behavior

<Please describe here what faulty behavior you are experiencing> On macOS with German localization the unit tests fail.

Expected behavior

<Please describe here the expected behavior> The unit tests should succeed.

Steps to reproduce the problem

  1. clone autoNumeric and run yarn && yarn test
FAILED TESTS:
  The AutoNumeric object
    initialization methods
      ✖ should correctly initialize the AutoNumeric element when the `formatOnPageLoad` option is set
        Firefox 61.0.0 (Mac OS X 10.13.0)
      Expected '12234678.321' to equal '$12,234,678.32'.
      <Jasmine>
      ./test/unit/autoNumeric.spec.js/</</<@webpack://autonumeric/test/unit/autoNumeric.spec.js:1150:12 <- tests.webpack.js:9:705409
      <Jasmine>

  Initialization calls
    Initialize a single AutoNumeric object
      ✖ should fail to init when the default value is outside of the min and max limits
        PhantomJS 2.1.1 (Mac OS X 0.0.0)
      TypeError: undefined is not an object (evaluating 'aNInput.remove') in tests.webpack.js (line 9)
      webpack://autonumeric/webpack/universalModuleDefinition:1:0 <- tests.webpack.js:9:1481375
      <Jasmine>

  autoNumeric options and `options.*` methods
    `options.*` methods
      ✖ should correctly update the `decimalPlacesShownOnFocus` option
        Firefox 61.0.0 (Mac OS X 10.13.0)
      Expected '2.222,12 €' to equal '2.222,1235 €'.
      <Jasmine>
      ./test/unit/autoNumeric.spec.js/</</<@webpack://autonumeric/test/unit/autoNumeric.spec.js:1483:12 <- tests.webpack.js:9:734042
      <Jasmine>

  Instantiated autoNumeric functions
    `selectInteger`
      ✖ should select only the decimal part
        Firefox 61.0.0 (Mac OS X 10.13.0)
      Expected '12.266,123 €' to equal '12.266,123457 €'.
      <Jasmine>
      ./test/unit/autoNumeric.spec.js/</</<@webpack://autonumeric/test/unit/autoNumeric.spec.js:5157:12 <- tests.webpack.js:9:990807
      <Jasmine>

  The AutoNumeric event lifecycle
    ✖ should send the 'autoNumeric:formatted' event when formatting is done
      Firefox 61.0.0 (Mac OS X 10.13.0)
    Expected spy formattedEvent to have been called 6 times. It was called 5 times.
    <Jasmine>
    ./test/unit/autoNumeric.spec.js/</<@webpack://autonumeric/test/unit/autoNumeric.spec.js:8420:8 <- tests.webpack.js:9:1305434
    <Jasmine>

I’ll try to investigate this further.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (21 by maintainers)

Most upvoted comments

@DanielRuf my bad, I created the Marked for deletion label, but in reality it should read marked for closing, or something like this. I never ever deleted an issue; as you mention, it’s pretty irresponsible to delete issues from an issue tracker (except perhaps in the case of credentials being pasted)!

Edit: There, I modified the label to Inactivity detected, and I’ll update the auto-reply too