style_test 1.0.0 copy "style_test: ^1.0.0" to clipboard
style_test: ^1.0.0 copied to clipboard

outdated

A starting point for Dart libraries or applications.

//TODO: Template

Features #

Tester for Style framework

Getting started #

add latest version "style_test" to dev_dependencies

Usage #

Ensure main is async and await initStyleTester

void main() async {
  await initStyleTester(
      "route",
      MyServer(),
          (tester) async {
        /// test /a/1
        tester("/a/1", bodyIs("1r"));
      });
}

Matchers #

bodyIs(matcherOrValue)

Check body.

matcherOrValue can be matcher instance.

Eg.

tester("/path/to", bodyIs(contains("any")));

statusCodeIs(int)

Check status code.

Eg.

tester("/path/to", statusCodeIs(200));

headerIs(key, value)

Check headers.

Eg.

tester("/path/to", headerIs("Location","http://localhost/my_user1"));

permissionDenied

tester("/path/to", permissionDenied);

isUnauthorized

tester("/path/to", isUnauthorized);

Additional information #

TODO:

0
likes
0
pub points
0%
popularity

Publisher

verified publisherstyledart.dev

A starting point for Dart libraries or applications.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

meta, style_dart, test

More

Packages that depend on style_test