The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Package {mochita}


Title: Test R Web Applications
Version: 1.0.0
Description: Write so-called 'Integration Tests' for your R web applications by declaring an HTTP request and the expectations its response should meet.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 8.0.0
Imports: httpuv, nanonext (≥ 1.10.1), R6, testthat (≥ 3.0.0)
Config/testthat/edition: 3
Suggests: routing, yyjsonr
URL: https://github.com/JulioCollazos64/mochita
BugReports: https://github.com/JulioCollazos64/mochita/issues
NeedsCompilation: no
Packaged: 2026-07-29 04:03:52 UTC; julio
Author: Julio Collazos [aut, cre], supertest contributors [ctb, cph] (authors listed in <https://github.com/forwardemail/supertest/graphs/contributors>)
Maintainer: Julio Collazos <amarullazo626@gmail.com>
Repository: CRAN
Date/Publication: 2026-08-06 13:40:02 UTC

mochita: Test R Web Applications

Description

Write so-called 'Integration Tests' for your R web applications by declaring an HTTP request and the expectations its response should meet.

Author(s)

Maintainer: Julio Collazos amarullazo626@gmail.com

Authors:

Other contributors:

See Also

Useful links:


Test an HTTP server

Description

mochita() builds the specification for testing an httpuv app. It returns a Mochita object whose methods can be chained together to build up a request, describe the expectations it should meet, and finally send it with ⁠$perform()⁠.

Usage

mochita(app)

Arguments

app

App definition, see httpuv::startServer.

Value

A Mochita R6 class object.

Mochita Methods

A Mochita is an R6 Class with the following methods:

Examples

## Not run: 
mochita(app)$get("/")$
  set("Accept", "text/plain")$
  expect(200)$
  expect("Content-Type", "text/plain")$
  perform()

## End(Not run)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.