-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop a test to ensure game constants are covered #152
Comments
I haven't written such a test before but I guess it's relatively simple to do.
Test 1 makes sure there's nothing left over in B that should be removed. All that remains is formatting the output neatly. |
Hello. I'm just beginning to explore Screeps for the first time and plan to do so using Deno. In my beginning research, I found this repo and decided to take a look at the open issues. This one caught my eye. While @tcdejong's idea seems straightforward, I think there is a major hurdle in the approach:
It doesn't seem that this repo actually provides any data values: only types (including literal types). I'm not aware of any project which will take a type declaration file of literal types and transform it into corresponding valid JavaScript data. If there is such a project, I'd love to know about it! I haven't closely examined the files from the projects yet, but I had another idea that might help reduce manual effort in the meantime until a completely automated solution is discovered:
Here is a deno script that will do what I've described above, printing the result to
|
Game constants are defined here.
It should be possible to parse this file and verify that the constants (and types) are also defined in typed-screeps.
This would help significantly in catching missing constants.
The text was updated successfully, but these errors were encountered: