Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

test: clubbell and macebell sit before the accessories

Duarte Santos3de6a1ba5f47
diff --git a/frontend/src/lib/equipment-extra.test.js b/frontend/src/lib/equipment-extra.test.js
index b08996d5e..0c23d6690 100644
--- a/frontend/src/lib/equipment-extra.test.js
+++ b/frontend/src/lib/equipment-extra.test.js
@@ -1,11 +1,14 @@
import { describe, expect, it } from 'vitest'
-import { ALL_EQUIPMENT } from './equipment.js'
+import { ACCESSORIES, ALL_EQUIPMENT } from './equipment.js'
import { isLoadedEq } from './exercises.js'
// Issue #393: clubbell and macebell are real loaded tools with no catalogue entries yet.
describe('clubbell and macebell', () => {
it('appends both to the equipment list when the catalogue does not use them', () => {
- expect(ALL_EQUIPMENT.slice(-2)).toEqual(['clubbell', 'macebell'])
+ // …after every catalogue value, and before the accessories (bench, pull-up bar), which close the list.
+ const end = ALL_EQUIPMENT.length - ACCESSORIES.length
+ expect(ALL_EQUIPMENT.slice(end - 2, end)).toEqual(['clubbell', 'macebell'])
+ expect(ALL_EQUIPMENT.slice(end)).toEqual(ACCESSORIES)
})
it('treats a set on either as a loaded set', () => {