News for hackers. Stuff that matters.

Ask HN: Would be good to create a NPM package that creates mocks from TS source?

What I mean is, if you guys see any good in a Unit testing tool that helps with the creation of mock data using your project's interfaces/types as source and expose certains functions that brings the mocked object easily to behave whatever you want.

The package would be based on this tool I've created https://butlermock.online/, thx. :)

( 2 comments | on HN )
Re:Ask HN: Would be good to create a NPM package that create... by PaulHoule on Sunday September 17, 2023 @01:50PM (#37547634)
If you think it is worth making a web site for I think it is worth making an npm package for.
Re:Ask HN: Would be good to create a NPM package that create... by devrafx on Monday September 18, 2023 @02:40PM (#37560203)
Yeah, I've been thinking that would be nice to create a folder that holds all the json with the data mocked once using your interfaces as reference, that way could be used for unit testing.