Reece Dunham
d43ccb1897
fix: invalid data in tests
2026-09-27 23:15:03 -04:00
Reece Dunham
6b3f79900d
refactor: Vitest migration
2026-09-27 05:07:51 -04:00
Reece Dunham
b6e92525d2
chore: Use as syntax to conform with Node's TS support
...
Node can't handle this syntax since it's not sure if it's JSX or a type cast.
2026-06-24 21:32:48 -04:00
Govert de Gans
89d8a7bf9f
fix: $eq condition where first value is null or undefined should always return false ( #32 )
...
* Add VSCode settings for a working test explorer sidebar
* fix: $eq should return false when any element is null or undefined
2024-11-07 19:06:24 +00:00
Anthony Fuller and Reece Dunham
2b24a2500f
feat: Add handling of arrays of objects ( #30 )
...
* Add handling of arrays of objects
* feat: throw an error if invalid input is provided
---------
Co-authored-by: Reece Dunham <[email protected] >
2024-07-25 13:08:42 -04:00
Reece Dunham
ca8402e70f
Revert "fix: remaining usages of hasOwnProperty"
...
This reverts commit b9f0b47d41 .
2024-07-25 12:12:18 -04:00
Reece Dunham
e6db4c192d
style: formatting
2024-07-25 12:11:48 -04:00
Reece Dunham
b9f0b47d41
fix: remaining usages of hasOwnProperty
2024-07-25 10:48:58 -04:00
Reece Dunham
bb2c2ac733
chore: Add test for contract id in handleEvent
2024-07-24 21:34:27 -04:00
Reece Dunham
b5904bb8e7
fix: type issue
2024-07-24 21:34:08 -04:00
Reece Dunham
3e8de1a689
Run prettier, remove the object.hasOwnProperty stuff (it's not needed)
2024-07-22 22:19:26 -04:00
Reece Dunham
c0952140ba
fix: typo
2024-07-21 16:21:05 -04:00
Reece Dunham
30bb540456
chore: run Update Copyright action
2024-06-22 22:55:00 -04:00
Govert de Gans
bbf3684c04
Add type checking to some actions ( #29 )
...
* rearrange statements for consistency
* Add tests for actions trying to modify undefined variables
* Fix running actions with wrong types to do nothing instead of breaking
* fix-fix: actually check the type of the right variable in $remove
* Also add tests for $inc/$dec undefined with 1 operand
Gotta reach those coverage targets :^)
2024-06-22 22:41:07 -04:00
Reece Dunham
dd4813cad7
Fix spacing stuff
2023-11-25 13:34:48 -05:00
Anthony Fuller
5df06dcba5
Use switch statements when handling ops ( #18 )
...
* Use switch statements when handling ops
* Change in to of
* Add test for ordering of actions
* Simplify ordering test
* Update with changes from main
---------
Signed-off-by: Anthony Fuller <[email protected] >
2023-05-08 22:31:40 +01:00
moonysolari
feda0cde1a
Only read from the context if a reference is prepended with a $ ( #17 )
...
* Fixes The Scenic Route
* Only read from the context if prepended with a $ + tests
2023-05-08 23:01:09 +02:00
AnthonyFuller
798936e4cc
Fix minor formatting issue in math-actions
2023-05-08 18:13:49 +01:00
AnthonyFuller
6a5fb927e3
Support 2 operand $mul actions
2023-05-06 17:49:34 +01:00
Govert de Gans and Reece Dunham
40aa5133ec
Support actions with constants ( #16 )
...
* Add support for actions that reference constants
* Add test with an action that references a constant
---------
Signed-off-by: Reece Dunham <[email protected] >
Co-authored-by: Reece Dunham <[email protected] >
2023-05-02 19:09:56 -04:00
Reece Dunham
4bf164aa91
Merge branch 'main' of https://github.com/thepeacockproject/StateMachineParser
2023-04-29 21:43:28 -04:00
Reece Dunham
700691847d
100% utils code coverage
2023-04-29 21:43:23 -04:00
AnthonyFuller
3b2bd0548e
Add new $inc test for incrementing by values in a context
2023-04-20 12:32:41 +01:00
Anthony Fuller
512b2996a4
Overhaul $reset to use the original context ( #13 )
...
* Overhaul `$reset` to use the original context
* Update spec with new `$reset` functionality
* Give empty object as original context
2023-04-19 21:49:56 +01:00
Anthony Fuller
70c7cedba8
Add support for $reset ( #12 )
...
* Add support for the reset op
* Add $reset to the spec
* Add tests for $reset
* Fix $reset test
2023-04-19 01:54:41 +01:00
moonysolari
a4f827c7a5
Support long arrays for $eq ( #9 )
2023-04-06 17:40:01 -04:00
moonysolari
d2d4c45335
Remove timer upon completion ( #6 )
...
* remove timer once completed
* Comments for timer deletion
* Add test for timer deletion and re-creation
2023-03-10 21:43:22 -05:00
Reece Dunham
651aba9589
Update Yarn to v4, replace nyc with c8
2023-01-15 16:35:46 -05:00
moonysolari
f07636f9d1
Fix event handling ( #3 )
...
* Try to fix context returned
* Fix bugs caused by using `context`
* Fix a broken test
2023-01-15 00:52:22 -05:00
Reece Dunham
e046c25e76
Remove $div node - it never existed (oops)
2022-12-07 13:03:28 -05:00
Reece Dunham
455edd3e67
Fix the timer test
2022-08-30 20:58:56 -04:00
Reece Dunham
4b94eb1878
Add tests for $ge and $le
2022-08-30 15:45:54 -04:00
Reece Dunham
897c5f2017
unit test cleanup
2022-08-20 08:36:25 -04:00
Reece Dunham
2796e5042c
Rewrite timers
2022-07-31 21:17:09 -04:00
Reece Dunham
1fee370c0f
Add external access to _path
2022-07-31 19:41:05 -04:00
Reece Dunham
d456441f0b
Several big breaking changes
...
- Nuke old timer implementation, working on a new one.
- Let consumers specify a logger.
- Let consumers specify a deep clone function.
- Run Prettier.
2022-07-31 16:01:07 -04:00
Reece Dunham
8ca29f2a7e
Ensure input is not actually falsy
2022-07-30 20:34:22 -04:00
Reece Dunham
76324d7f0c
Support $contains for strings
2022-07-17 03:13:46 -04:00
Reece Dunham
de2ac32603
More documentation writing
2022-07-16 02:41:58 -04:00
Reece Dunham
53dfd7e4ab
Run Prettier
2022-07-16 02:35:06 -04:00
Reece Dunham
1c3efb1f02
Add tests for strange string reference edge cases
2022-07-16 01:54:45 -04:00
Reece Dunham
e62badc12f
100% coverage in utils
2022-07-14 16:10:30 -07:00
Reece Dunham
58aea16d78
Extra handleEvent tests.
2022-07-13 00:32:15 -04:00
Reece Dunham
6f6424bcc6
Support Count property on arrays, move findNamedChild to utils, drop support for comparing arrays
2022-07-01 12:42:46 -04:00
Reece Dunham
c1a10618b7
v4.0.0
2022-06-20 15:17:53 -04:00
Reece Dunham
679d7fb79d
Support $remove
2022-06-20 14:03:40 -04:00
Reece Dunham
8a53253d68
Change how immediate states are handled, add copyright to all eligible files.
2022-06-16 15:57:13 -04:00
Reece Dunham
e001b19382
Add basic tracing, run prettier
2022-06-10 15:31:10 -04:00
Reece Dunham
e7c848fd2e
Raise the code coverage by 0.35%
2022-05-27 23:47:44 -04:00
Reece Dunham
81d324f9c9
Add sha1 tests (raises code coverage)
2022-05-27 23:30:26 -04:00