You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe("monsters",function()=>{describe('JSON consistency',function(){it('should follow a consistent structure',function(){monsters.forEach((monster)=>{expect(monster.name).to.be.a('string');expect(monster.size).to.be.a('string');expect(monster.armor_class).to.be.a('number');// etc etc.// more valuable for complex properties.});});});});
The text was updated successfully, but these errors were encountered:
@bagelbits@ogregoire been off a bit but thinking about this one, since there are a lot of changes lately. changes are great! This would ensure they are uniform. Down side is the test has to be updated with the changes (but so long as they stay fairly simple, this is prob an upside as well).
I mean this would lead towards more standardized Schemas, which would also make life easier to document them in the API as well. (I could definitely use help with documenting stuff but also it's kind of on me to do it).
Just wanted to hop on this thread to say this would make it much easier for folks like me to maintain our API clients for the DnD project. Some sort of consistent schema checking is definitely a bigtime win in my book.
Thinking probably a mocha/chai script (or just plain ol' javascript really, no need to go crazy):
First could be something simple like
The text was updated successfully, but these errors were encountered: