natsort icon indicating copy to clipboard operation
natsort copied to clipboard

semver sort does not work

Open flanec opened this issue 3 years ago • 1 comments

also test/spec/version.spec.js:6 version number strings: › #6 test case is not executed with npm test, since the version.js file is ignored by jest.

to reproduce the the issue:

  • rename file, mv ./test/spec/version.spec.ts ./test/spec/1test.spec.ts
  • run tests, npm test

it will fail with error:

  ● version number strings:  › #6

    expect(received).toEqual(expected)

    Expected value to equal:
      ["1.9.0", "1.10.0", "1.11.0"]
    Received:
      ["1.10.0", "1.11.0", "1.9.0"]

    Difference:

    - Expected
    + Received

      Array [
    -   "1.9.0",
        "1.10.0",
        "1.11.0",
    +   "1.9.0",
      ]

flanec avatar Dec 15 '21 18:12 flanec

I added a fix that seems to work in https://github.com/dscalzi/natsort-esm

dscalzi avatar Mar 17 '23 23:03 dscalzi