fluent-asserts-vibe 1.0.0-beta.2
Fluent assertions for Vibe.d
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
There are a lot of ways in which you can test an web api. Unfortunately, vibe.d does not come with utilities that allows us to write
simple and nice tests. This is a library that improves your testing experience by extending the fluent-asserts library with features that help you
to test routes and Json
values.
To begin
- Add the DUB dependency:
https://code.dlang.org/packages/fluent-asserts-vibe
$ dub add fluent-asserts-vive
in your source files:
version(unittest) import fluent.asserts.vibe;
- Use it:
unittest {
auto request = new RequestRouter(router);
request
.get("/")
.end((Response response) => () {
response.bodyString.should.not.equal("hello");
});
}
unittest {
Assert.equal(true, false, "this is a failing assert");
}
- Run the tests:
➜ dub test --compiler=ldc2
API Docs
The full documentation of the fluent-asserts can be found at: http://fluentasserts.szabobogdan.com/
License
MIT. See LICENSE for details.
- Registered by Szabo Bogdan
- 1.0.0-beta.2 released 12 days ago
- gedaiu/fluent-asserts-vibe
- fluentasserts.szabobogdan.com/
- MIT
- Copyright © 2022, Szabo Bogdan
- Authors:
- Dependencies:
- vibe-d, fluent-asserts
- Versions:
-
1.0.0-beta.2 2024-Nov-27 1.0.0-beta.1 2022-Aug-12 0.2.0-alpha.5 2022-May-02 0.2.0-alpha.4 2021-Oct-06 0.2.0-alpha.3 2021-May-17 - Download Stats:
-
-
1 downloads today
-
1 downloads this week
-
30 downloads this month
-
5818 downloads total
-
- Score:
- 1.2
- Short URL:
- fluent-asserts-vibe.dub.pm