logo
首页技术栈工具库讨论
hspec-pg-transact

hspec-pg-transact

Helpers for creating database tests with hspec and pg-transact hspec-pg-transact utilizes tmp-postgres to automatically and connect to a temporary instance of postgres on a random port. In the example above describeDB wraps describe with a beforeAll hook for creating a db and a afterAll hook for stopping a db. Tests can be written with itDB which is wrapper around it that uses the passed in Connection to run a db transaction automatically for the test. The libary also provides a few other functions for more fine grained control over running transactions in tests.
由 
bruceshi2021-01-14 收录
--
推荐
不推荐
更多信息
HACKAGE
carbal install hspec-pg-transact
查看
标签
根据用户添加的标签生成
暂无标签