x/drash/tests/deps.ts

A microframework for Deno's HTTP server with zero third-party dependencies
Latest
import * as mod from "https://deno.land/x/drash@v2.7.0/tests/deps.ts?code";

Classes

This class is for throwing errors in the request-resource-response lifecycle.

A class that holds the representation of an incoming request

This is the base resource class for all resources. All resource classes must extend this base resource class.

This class handles the entire request-resource-response lifecycle. It is in charge of handling incoming requests, matching them to resources for further processing, and sending responses based on the processes set in the resource. It is also in charge of sending error responses that "bubble up" during the request-resource-response lifecycle.

Functions

Make an assertion, error will be thrown if expr does not have truthy value.

Make an assertion that actual and expected are equal, deeply. If not deeply equal, then throw.

Make an assertion that actual and expected are not equal, deeply. If not then throw.

Set text color to green.

Determines the common path from a set of paths, using an optional separator, which defaults to the OS default separator.

Convert a glob string to a regular expression.

Test whether the given string is a glob

Like join(), but doesn't collapse "**/.." when globstar is true.

Like normalize(), but doesn't collapse "**/.." when globstar is true.

Set text color to red.

Interfaces

An interface to help type key-value pair objects with different values.

This is used to type a MIME type object. Below are more details on the members in this interface.

path_parameters A key-value string defining the path parameters that were passed in by the request. This value is set in resource_handler.ts#getResource().

Options to help create the server object.

path_parameters A key-value string defining the path parameters that were passed in by the request. This value is set in resource_handler.ts#getResource().

A parsed path object generated by path.parse() or consumed by path.format().