Commit Graph

27 Commits

Author SHA1 Message Date
Refringe
5aebbb9c86
Test - ItemHelper - 3.8 Refactor
- Removes unused code from getRepairableItemQualityValue in itemHelper
- Updated tests for getRepairableItemQualityValue to no longer assume a special calculation for armour
- Added tests for adoptOrphanedItems (moved from insuranceController)
2024-04-11 21:18:36 -04:00
Refringe
c123c034cf
Test - Updates ItemHelper Tests
- Removes tests for a method that no longer exists: `generateItemsFromStackSlot`
- Updates a test to use a mock to ensure test data reliability
2024-04-10 23:13:46 -04:00
Refringe
0ec0b7a40c
Test - Updates fromRUB tests to use mocks 2024-04-10 23:10:17 -04:00
Refringe
0793df60c2
Formatting Change - Space is now given around object properties. 2023-11-13 12:38:16 -05:00
Refringe
32b47bdc18
Formatting Change - When a statement can be moved into a single line and still be under the maximum line length, it is. 2023-11-13 12:31:52 -05:00
Refringe
ce45862e75
Favours dot object notation whenever possible. 2023-11-13 11:51:02 -05:00
Refringe
320c8b7d48
Formatting for test classes. 2023-11-10 17:21:20 -05:00
Dev
43eadcbfa9 Update test to make use of string literals 2023-11-08 08:59:28 +00:00
Refringe
0ad85b45e1
Small ItemHelper.getRandomCompatibleCaliberTemplateId() Improvements
- Updated to safely access a deeply nested property.
- Updated to safely access the item `_id` and `_name` properties in the warning log.
- Updated to use the `RandomUtil.getArrayValue()` method to select a random ammo item template ID.
- Finished up some tests.
2023-11-07 22:59:04 -05:00
Dev
262c8a6e83 Add tests for getRandomCompatibleCaliberTemplateId() 2023-11-07 22:21:48 +00:00
Dev
c90f9499b1 Add more itemHelper tests 2023-11-07 21:52:41 +00:00
Dev
64845bf8ff Update tests 2023-11-07 21:30:29 +00:00
Refringe
a7d3e0d59a
Tests: Moves class (re)resolution to beforeEach to help ensure that all mocks have been reset. 2023-11-06 14:39:12 -05:00
Dev
c12819ce33 Check for correct return type 2023-11-05 12:40:50 +00:00
Dev
d1614b19a6 Add tests for InRaidHelper 2023-11-05 10:49:20 +00:00
Dev
d4f2139236 Add additional tests to ItemHelper.test 2023-11-05 10:19:00 +00:00
Dev
69b32fabdf Add HandbookHelper tests 2023-11-04 19:42:07 +00:00
Dev
6ca19150bc Add BotHelper tests 2023-11-04 13:34:09 +00:00
Dev
b303849ad1 Add 3 test for getItemStackSize() 2023-11-04 10:21:56 +00:00
Dev
2f7f8a3f62 use correct base type id for test 2023-11-04 09:53:30 +00:00
Refringe
f5c379e189
Mocks some logger methods to prevent actual execution. 2023-10-30 11:46:10 -04:00
TheSparta
b31a48066b Removed usage of global.container
Importing container from tsyringe directly seems to work fine.
2023-10-29 22:20:35 +00:00
Refringe
ad5e0815b6 Migrated from Jest to Vitest
Basically the same, except it plays nicer with Typescript and ESM.

I have it mostly working, except for a type error:
`TypeError: Int32Array is not a constructor`

But I'm too damn tired it debug it at the moment.
2023-10-29 22:20:32 +00:00
Refringe
00ac9e190a Additional Tests & New Setup
- Adds additional ItemHelper tests
- Attempts to bring container registration into the environment to debug how we can register everything but not actually start the server.
2023-10-29 22:20:32 +00:00
Refringe
f009d13d2a Successfully importing database and passing global container. 2023-10-29 22:20:31 +00:00
TheSparta
1eceb797e2 fixed tests tsyringe resolve 2023-10-29 22:20:30 +00:00
Refringe
ca0547ed1a Trying to get the @spt-aki path alias working in a custom Jest Env. 2023-10-29 22:20:29 +00:00