@quenty/humanoidutils 2.18.1 → 2.20.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,6 +3,14 @@
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
+ # [2.20.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/humanoidutils@2.19.0...@quenty/humanoidutils@2.20.0) (2026-08-28)
7
+
8
+ **Note:** Version bump only for package @quenty/humanoidutils
9
+
10
+ # [2.19.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/humanoidutils@2.18.1...@quenty/humanoidutils@2.19.0) (2026-08-28)
11
+
12
+ **Note:** Version bump only for package @quenty/humanoidutils
13
+
6
14
  ## [2.18.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/humanoidutils@2.18.0...@quenty/humanoidutils@2.18.1) (2026-08-14)
7
15
 
8
16
  **Note:** Version bump only for package @quenty/humanoidutils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/humanoidutils",
3
- "version": "2.18.1",
3
+ "version": "2.20.0",
4
4
  "description": "General humanoid utility code.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -31,12 +31,13 @@
31
31
  "access": "public"
32
32
  },
33
33
  "dependencies": {
34
- "@quenty/instanceutils": "13.35.2",
34
+ "@quenty/instanceutils": "13.37.0",
35
+ "@quenty/jestutils": "1.1.0",
35
36
  "@quenty/loader": "10.11.1",
36
- "@quenty/maid": "3.11.1",
37
- "@quenty/nevermore-test-runner": "1.5.1",
38
- "@quenty/rx": "13.33.1",
37
+ "@quenty/maid": "3.12.0",
38
+ "@quenty/nevermore-test-runner": "1.6.0",
39
+ "@quenty/rx": "13.34.0",
39
40
  "@quentystudios/jest-lua": "3.10.0-quenty.2"
40
41
  },
41
- "gitHead": "f084360c3729ea424d49d9bc42f8f0d1c128fa82"
42
+ "gitHead": "346201e192e467cb71160f43029863853be855b5"
42
43
  }
@@ -7,6 +7,7 @@ local require = require(script.Parent.loader).load(script)
7
7
 
8
8
  local HumanoidUtils = require("HumanoidUtils")
9
9
  local Jest = require("Jest")
10
+ local JestUtils = require("JestUtils")
10
11
  local Maid = require("Maid")
11
12
 
12
13
  local describe = Jest.Globals.describe
@@ -26,11 +27,13 @@ local function setup(): any
26
27
  humanoid.Parent = rig
27
28
  return rig, humanoid
28
29
  end,
29
- destroy = function()
30
+ Destroy = function(_self)
30
31
  maid:DoCleaning()
31
32
  end,
32
33
  }
33
34
 
35
+ maid:GiveTask(JestUtils.afterThis(controller))
36
+
34
37
  return controller
35
38
  end
36
39
 
@@ -44,7 +47,7 @@ describe("HumanoidUtils.getHumanoid", function()
44
47
 
45
48
  expect(HumanoidUtils.getHumanoid(limb)).toBe(humanoid)
46
49
 
47
- controller.destroy()
50
+ controller:Destroy()
48
51
  end)
49
52
 
50
53
  it("finds the humanoid from a nested descendant", function()
@@ -59,7 +62,7 @@ describe("HumanoidUtils.getHumanoid", function()
59
62
 
60
63
  expect(HumanoidUtils.getHumanoid(handle)).toBe(humanoid)
61
64
 
62
- controller.destroy()
65
+ controller:Destroy()
63
66
  end)
64
67
 
65
68
  it("returns nil outside of a humanoid model", function()
@@ -69,7 +72,7 @@ describe("HumanoidUtils.getHumanoid", function()
69
72
 
70
73
  expect(HumanoidUtils.getHumanoid(part)).toBeNil()
71
74
 
72
- controller.destroy()
75
+ controller:Destroy()
73
76
  end)
74
77
  end)
75
78
 
@@ -81,7 +84,7 @@ describe("HumanoidUtils.isHumanoidStateEnabled", function()
81
84
  (HumanoidUtils :: any).isHumanoidStateEnabled(nil, Enum.HumanoidStateType.Jumping)
82
85
  end).toThrow("No humanoid")
83
86
 
84
- controller.destroy()
87
+ controller:Destroy()
85
88
  end)
86
89
 
87
90
  it("errors without a state type", function()
@@ -92,7 +95,7 @@ describe("HumanoidUtils.isHumanoidStateEnabled", function()
92
95
  (HumanoidUtils :: any).isHumanoidStateEnabled(humanoid, nil)
93
96
  end).toThrow("No stateType")
94
97
 
95
- controller.destroy()
98
+ controller:Destroy()
96
99
  end)
97
100
 
98
101
  it("reads the enabled state per state type", function()
@@ -104,7 +107,7 @@ describe("HumanoidUtils.isHumanoidStateEnabled", function()
104
107
  expect(HumanoidUtils.isHumanoidStateEnabled(humanoid, Enum.HumanoidStateType.Jumping)).toBe(false)
105
108
  expect(HumanoidUtils.isHumanoidStateEnabled(humanoid, Enum.HumanoidStateType.Climbing)).toBe(true)
106
109
 
107
- controller.destroy()
110
+ controller:Destroy()
108
111
  end)
109
112
  end)
110
113
 
@@ -116,7 +119,7 @@ describe("HumanoidUtils.isJumpEnabled", function()
116
119
  (HumanoidUtils :: any).isJumpEnabled(nil)
117
120
  end).toThrow("No humanoid")
118
121
 
119
- controller.destroy()
122
+ controller:Destroy()
120
123
  end)
121
124
 
122
125
  it("is enabled for a default humanoid", function()
@@ -125,7 +128,7 @@ describe("HumanoidUtils.isJumpEnabled", function()
125
128
 
126
129
  expect(HumanoidUtils.isJumpEnabled(humanoid)).toBe(true)
127
130
 
128
- controller.destroy()
131
+ controller:Destroy()
129
132
  end)
130
133
 
131
134
  it("is disabled while the jumping state is disabled", function()
@@ -136,7 +139,7 @@ describe("HumanoidUtils.isJumpEnabled", function()
136
139
 
137
140
  expect(HumanoidUtils.isJumpEnabled(humanoid)).toBe(false)
138
141
 
139
- controller.destroy()
142
+ controller:Destroy()
140
143
  end)
141
144
 
142
145
  it("reads jump power while UseJumpPower is true", function()
@@ -152,7 +155,7 @@ describe("HumanoidUtils.isJumpEnabled", function()
152
155
  humanoid.JumpPower = 50
153
156
  expect(HumanoidUtils.isJumpEnabled(humanoid)).toBe(true)
154
157
 
155
- controller.destroy()
158
+ controller:Destroy()
156
159
  end)
157
160
 
158
161
  it("reads jump height while UseJumpPower is false", function()
@@ -168,7 +171,7 @@ describe("HumanoidUtils.isJumpEnabled", function()
168
171
  humanoid.JumpHeight = 7
169
172
  expect(HumanoidUtils.isJumpEnabled(humanoid)).toBe(true)
170
173
 
171
- controller.destroy()
174
+ controller:Destroy()
172
175
  end)
173
176
  end)
174
177
 
@@ -181,6 +184,6 @@ describe("HumanoidUtils.forceUnseatHumanoid", function()
181
184
 
182
185
  expect(humanoid.Sit).toBe(false)
183
186
 
184
- controller.destroy()
187
+ controller:Destroy()
185
188
  end)
186
189
  end)
@@ -6,6 +6,7 @@
6
6
  local require = require(script.Parent.loader).load(script)
7
7
 
8
8
  local Jest = require("Jest")
9
+ local JestUtils = require("JestUtils")
9
10
  local Maid = require("Maid")
10
11
  local RxHumanoidUtils = require("RxHumanoidUtils")
11
12
 
@@ -36,11 +37,13 @@ local function setup(): any
36
37
  subscription:Destroy()
37
38
  end
38
39
  end,
39
- destroy = function()
40
+ Destroy = function(_self)
40
41
  maid:DoCleaning()
41
42
  end,
42
43
  }
43
44
 
45
+ maid:GiveTask(JestUtils.afterThis(controller))
46
+
44
47
  return controller
45
48
  end
46
49
 
@@ -52,7 +55,7 @@ describe("RxHumanoidUtils.observeRunningSpeed", function()
52
55
  (RxHumanoidUtils :: any).observeRunningSpeed(nil)
53
56
  end).toThrow("No humanoid")
54
57
 
55
- controller.destroy()
58
+ controller:Destroy()
56
59
  end)
57
60
 
58
61
  -- Cloud runs never step the humanoid state machine, so Running/Jumping/Seated never fire and only
@@ -65,7 +68,7 @@ describe("RxHumanoidUtils.observeRunningSpeed", function()
65
68
 
66
69
  expect(speeds).toEqual({ 0 })
67
70
 
68
- controller.destroy()
71
+ controller:Destroy()
69
72
  end)
70
73
  end)
71
74
 
@@ -78,7 +81,7 @@ describe("RxHumanoidUtils.observeHumanoidStateType", function()
78
81
 
79
82
  expect(stateTypes).toEqual({ humanoid:GetState() })
80
83
 
81
- controller.destroy()
84
+ controller:Destroy()
82
85
  end)
83
86
  end)
84
87
 
@@ -90,7 +93,7 @@ describe("RxHumanoidUtils.observeHumanoidStateEnabled", function()
90
93
  (RxHumanoidUtils :: any).observeHumanoidStateEnabled(nil, Enum.HumanoidStateType.Jumping)
91
94
  end).toThrow("No humanoid")
92
95
 
93
- controller.destroy()
96
+ controller:Destroy()
94
97
  end)
95
98
 
96
99
  it("errors without a state type", function()
@@ -101,7 +104,7 @@ describe("RxHumanoidUtils.observeHumanoidStateEnabled", function()
101
104
  (RxHumanoidUtils :: any).observeHumanoidStateEnabled(humanoid, nil)
102
105
  end).toThrow("No stateType")
103
106
 
104
- controller.destroy()
107
+ controller:Destroy()
105
108
  end)
106
109
 
107
110
  it("emits the current enabled state on subscribe", function()
@@ -113,7 +116,7 @@ describe("RxHumanoidUtils.observeHumanoidStateEnabled", function()
113
116
 
114
117
  expect(enabled).toEqual({ true })
115
118
 
116
- controller.destroy()
119
+ controller:Destroy()
117
120
  end)
118
121
 
119
122
  it("emits when the state is disabled and re-enabled", function()
@@ -128,7 +131,7 @@ describe("RxHumanoidUtils.observeHumanoidStateEnabled", function()
128
131
 
129
132
  expect(enabled).toEqual({ true, false, true })
130
133
 
131
- controller.destroy()
134
+ controller:Destroy()
132
135
  end)
133
136
 
134
137
  it("only emits distinct values", function()
@@ -144,7 +147,7 @@ describe("RxHumanoidUtils.observeHumanoidStateEnabled", function()
144
147
 
145
148
  expect(enabled).toEqual({ true, false })
146
149
 
147
- controller.destroy()
150
+ controller:Destroy()
148
151
  end)
149
152
 
150
153
  it("ignores other state types", function()
@@ -159,7 +162,7 @@ describe("RxHumanoidUtils.observeHumanoidStateEnabled", function()
159
162
 
160
163
  expect(enabled).toEqual({ true })
161
164
 
162
- controller.destroy()
165
+ controller:Destroy()
163
166
  end)
164
167
 
165
168
  it("stops emitting once unsubscribed", function()
@@ -175,7 +178,7 @@ describe("RxHumanoidUtils.observeHumanoidStateEnabled", function()
175
178
 
176
179
  expect(enabled).toEqual({ true })
177
180
 
178
- controller.destroy()
181
+ controller:Destroy()
179
182
  end)
180
183
  end)
181
184
 
@@ -187,7 +190,7 @@ describe("RxHumanoidUtils.observeJumpEnabled", function()
187
190
  (RxHumanoidUtils :: any).observeJumpEnabled(nil)
188
191
  end).toThrow("No humanoid")
189
192
 
190
- controller.destroy()
193
+ controller:Destroy()
191
194
  end)
192
195
 
193
196
  it("is enabled for a default humanoid", function()
@@ -198,7 +201,7 @@ describe("RxHumanoidUtils.observeJumpEnabled", function()
198
201
 
199
202
  expect(enabled).toEqual({ true })
200
203
 
201
- controller.destroy()
204
+ controller:Destroy()
202
205
  end)
203
206
 
204
207
  it("is disabled while the jumping state is disabled", function()
@@ -212,7 +215,7 @@ describe("RxHumanoidUtils.observeJumpEnabled", function()
212
215
 
213
216
  expect(enabled).toEqual({ true, false, true })
214
217
 
215
- controller.destroy()
218
+ controller:Destroy()
216
219
  end)
217
220
 
218
221
  it("reads jump power while UseJumpPower is true", function()
@@ -228,7 +231,7 @@ describe("RxHumanoidUtils.observeJumpEnabled", function()
228
231
 
229
232
  expect(enabled).toEqual({ true, false, true })
230
233
 
231
- controller.destroy()
234
+ controller:Destroy()
232
235
  end)
233
236
 
234
237
  it("reads jump height while UseJumpPower is false", function()
@@ -244,7 +247,7 @@ describe("RxHumanoidUtils.observeJumpEnabled", function()
244
247
 
245
248
  expect(enabled).toEqual({ true, false, true })
246
249
 
247
- controller.destroy()
250
+ controller:Destroy()
248
251
  end)
249
252
 
250
253
  it("switches which jump strength it reads with UseJumpPower", function()
@@ -261,7 +264,7 @@ describe("RxHumanoidUtils.observeJumpEnabled", function()
261
264
 
262
265
  expect(enabled).toEqual({ true, false, true })
263
266
 
264
- controller.destroy()
267
+ controller:Destroy()
265
268
  end)
266
269
 
267
270
  it("ignores the unused jump strength", function()
@@ -277,7 +280,7 @@ describe("RxHumanoidUtils.observeJumpEnabled", function()
277
280
 
278
281
  expect(enabled).toEqual({ true })
279
282
 
280
- controller.destroy()
283
+ controller:Destroy()
281
284
  end)
282
285
 
283
286
  it("stays disabled while both the state and the jump power are disabled", function()
@@ -293,7 +296,7 @@ describe("RxHumanoidUtils.observeJumpEnabled", function()
293
296
 
294
297
  expect(enabled).toEqual({ false, true })
295
298
 
296
- controller.destroy()
299
+ controller:Destroy()
297
300
  end)
298
301
 
299
302
  it("stops emitting once unsubscribed", function()
@@ -307,6 +310,6 @@ describe("RxHumanoidUtils.observeJumpEnabled", function()
307
310
 
308
311
  expect(enabled).toEqual({ true })
309
312
 
310
- controller.destroy()
313
+ controller:Destroy()
311
314
  end)
312
315
  end)