Dust.Testing (dustlayer v0.1.1)

Copy Markdown View Source

Test helpers for applications that use Dust. In :manual test mode, Dust uses a memory cache and no server connection. Use these functions to control Dust state in tests.

Summary

Functions

Build an event map for testing subscriber modules in isolation.

Fire an event through the subscriber pipeline as if the server sent it. Synchronous.

Populate the cache with known state. get/enum will return this data.

Control what Dust.status/1 returns.

Functions

build_event(store, path, opts \\ [])

Build an event map for testing subscriber modules in isolation.

emit(store, path, opts \\ [])

Fire an event through the subscriber pipeline as if the server sent it. Synchronous.

seed(store, entries)

Populate the cache with known state. get/enum will return this data.

set_status(store, connection_status, opts \\ [])

Control what Dust.status/1 returns.