StellateHQ / fuse

Fuse: The fastest way to build and query great APIs with TypeScript

Home Page:https://fusedata.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testing

danstarns opened this issue · comments

We cannot trust this or recommend it to our clients when there is only 1 test file

Screenshot 2023-12-16 at 12 35 27 Screenshot 2023-12-16 at 12 38 46

Please add more testing so we can trust this framework and or reach out for help ✌️

Hey,

I get that that's an issue and I've mainly focussed on integrating with Next.JS which makes it a really big pain to test 😅

Now that we have #79 merged it becomes an awful lot easier to test things. That being said I would highly encourage "be the change you want to see", feel free to add any tests you like. I'd happily guide folks in that process.

To be clear this is 100% a missing piece in the repo and the hard testability is no excuse in terms of us having to iterate on this.

I've added some more general builder tests in #96 however the next part of it would be fixtures/ where we do the whole fuse dev --server and fuse build --server workflow and check whether the correct plugins are initialised.

@JoviDeCroock this already looks a lot better and adds more trust to the tool! Thanks.

Hey,

I get that that's an issue and I've mainly focussed on integrating with Next.JS which makes it a really big pain to test 😅

Now that we have #79 merged it becomes an awful lot easier to test things. That being said I would highly encourage "be the change you want to see", feel free to add any tests you like. I'd happily guide folks in that process.

To be clear this is 100% a missing piece in the repo and the hard testability is no excuse in terms of us having to iterate on this.

I've added some more general builder tests in #96 however the next part of it would be fixtures/ where we do the whole fuse dev --server and fuse build --server workflow and check whether the correct plugins are initialised.

To test compatibility with Next.js wdyt about leveraging a headless browser environment, spawing a Next.js app, building a fuse schema, and then querying it inside the environment asserting the result?