@quenty/elo 7.19.0-canary.544.548de10.0 → 7.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,7 +3,19 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [7.19.0-canary.544.548de10.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/elo@7.18.1...@quenty/elo@7.19.0-canary.544.548de10.0) (2025-03-29)
6
+ # [7.19.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/elo@7.18.2...@quenty/elo@7.19.0) (2025-04-02)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Fix existing tests ([655787c](https://github.com/Quenty/NevermoreEngine/commit/655787ced1139136e12f81800e229aa076731561))
12
+ * Fix percentile test ([3f5a3e1](https://github.com/Quenty/NevermoreEngine/commit/3f5a3e1713068da6783bfc06634e3d793ccd4030))
13
+
14
+
15
+
16
+
17
+
18
+ ## [7.18.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/elo@7.18.1...@quenty/elo@7.18.2) (2025-03-31)
7
19
 
8
20
  **Note:** Version bump only for package @quenty/elo
9
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/elo",
3
- "version": "7.19.0-canary.544.548de10.0",
3
+ "version": "7.19.0",
4
4
  "description": "Elo rating utility library.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -29,12 +29,12 @@
29
29
  "access": "public"
30
30
  },
31
31
  "devDependencies": {
32
- "@quenty/blend": "12.18.0-canary.544.548de10.0",
33
- "@quenty/loader": "10.8.0",
34
- "@quenty/maid": "3.4.0"
32
+ "@quenty/blend": "^12.18.0",
33
+ "@quenty/loader": "^10.8.0",
34
+ "@quenty/maid": "^3.4.0"
35
35
  },
36
36
  "dependencies": {
37
- "@quenty/probability": "2.3.1"
37
+ "@quenty/probability": "^2.3.1"
38
38
  },
39
- "gitHead": "548de107be4443f142f606f7e57fee94ccbbbe8f"
39
+ "gitHead": "e8ea56930e65322fcffc05a1556d5df988068f0b"
40
40
  }
@@ -5,6 +5,7 @@
5
5
 
6
6
  local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
7
7
 
8
+ local EloMatchResult = require("EloMatchResult")
8
9
  local EloUtils = require("EloUtils")
9
10
  local Jest = require("Jest")
10
11
 
@@ -28,11 +29,11 @@ describe("EloUtils.getNewElo", function()
28
29
  playerRating,
29
30
  opponentRating,
30
31
  {
31
- EloUtils.MatchResult.PLAYER_ONE_WIN;
32
+ EloMatchResult.PLAYER_ONE_WIN;
32
33
  })
33
34
 
34
- expect(newPlayerWinRating > playerRating).to.equal(true)
35
- expect(newOpponentWinRating < opponentRating).to.equal(true)
35
+ expect(newPlayerWinRating > playerRating).toBe(true)
36
+ expect(newOpponentWinRating < opponentRating).toBe(true)
36
37
  end)
37
38
 
38
39
  it("should change on a loss", function()
@@ -41,11 +42,11 @@ describe("EloUtils.getNewElo", function()
41
42
  playerRating,
42
43
  opponentRating,
43
44
  {
44
- EloUtils.MatchResult.PLAYER_TWO_WIN;
45
+ EloMatchResult.PLAYER_TWO_WIN;
45
46
  })
46
47
 
47
- expect(newPlayerLossRating < playerRating).to.equal(true)
48
- expect(newOpponentLossRating > opponentRating).to.equal(true)
48
+ expect(newPlayerLossRating < playerRating).toBe(true)
49
+ expect(newOpponentLossRating > opponentRating).toBe(true)
49
50
  end)
50
51
 
51
52
  it("should change on a draw", function()
@@ -54,11 +55,11 @@ describe("EloUtils.getNewElo", function()
54
55
  playerRating,
55
56
  opponentRating,
56
57
  {
57
- EloUtils.MatchResult.DRAW;
58
+ EloMatchResult.DRAW;
58
59
  })
59
60
 
60
- expect(newPlayerDrawRating > playerRating).to.equal(true)
61
- expect(newOpponentDrawRating < opponentRating).to.equal(true)
61
+ expect(newPlayerDrawRating > playerRating).toBe(true)
62
+ expect(newOpponentDrawRating < opponentRating).toBe(true)
62
63
  end)
63
64
 
64
65
  it("should change more on an unexpected win then a loss", function()
@@ -66,14 +67,14 @@ describe("EloUtils.getNewElo", function()
66
67
  local drawChange = math.abs(playerRating - newPlayerDrawRating)
67
68
  local lossChange = math.abs(playerRating - newPlayerLossRating)
68
69
 
69
- expect(winChange > lossChange).to.equal(true)
70
- expect(winChange > drawChange ).to.equal(true)
71
- expect(drawChange > lossChange).to.equal(true)
70
+ expect(winChange > lossChange).toBe(true)
71
+ expect(winChange > drawChange ).toBe(true)
72
+ expect(drawChange > lossChange).toBe(true)
72
73
  end)
73
74
 
74
75
  it("should compute percentile as 0.5", function()
75
76
  local percentile = EloUtils.getPercentile(config, 1400)
76
77
 
77
- expect(percentile).to.equal(0.5)
78
+ expect(percentile).toBeCloseTo(0.5, 5)
78
79
  end)
79
80
  end)