near-daos / sputnik-dao-contract

Smart contracts for https://app.astrodao.com
https://astrodao.com/
MIT License
108 stars 76 forks source link

group tests, so it's less buggy #104

Closed d3v3us closed 2 years ago

d3v3us commented 2 years ago

Potentially fixing bug with tests ava

ctindogaru commented 2 years ago

Thank you for the contribution, but I incline towards having more granularity inside the tests.

I'm in the favour of 7 smaller, isolated files than a giant one.

d3v3us commented 2 years ago

Thank you for the contribution, but I incline towards having more granularity inside the tests.

I'm in the favour of 7 smaller, isolated files than a giant one.

That was the exact bug with ava, with multiple files it consumes more memory, and bug with endpoints occurs...)

TrevorJTClarke commented 2 years ago

That was the exact bug with ava, with multiple files it consumes more memory, and bug with endpoints occurs...)

AVA concurrency could be at fault, however I agree with @ctindogaru with file structure remaining. Much better for maintainability long term. I think the real fix would be finding dependencies in mocks and splitting those into utilities on before/after methods to help with conflicts. More test coverage is desired as well :)

d3v3us commented 2 years ago

TrevorJTClarke I think we will rewrite all the tests to rust version of workspaces, tests will run faster and we are more rusty)

TrevorJTClarke commented 2 years ago

tests will run faster and we are more rusty)

@deveusss that would be incredible! I def appreciate the move to Rust if you do in fact do so. I believe workspaces-rs to be ready but potentially less mature than workspaces-js FYI. Rust to test Rust is ideal for sure.