View Source Exposure (Exposure v1.0.0)

Exposure adds support for snapshot testing to Elixir projects.

For more information, see Usage.

Summary

Functions

Defines a snapshot test.

Defines a snapshot test that utilizes the test context.

Functions

test_snapshot(name, opts)

(macro)
@spec test_snapshot(
  binary(),
  keyword()
) :: Macro.t()

Defines a snapshot test.

Examples

describe "my_fun/2" do
  test_snapshot "works as expected" do
    my_fun("foo", 123)
  end
end

test_snapshot(name, context, opts)

(macro)
@spec test_snapshot(binary(), Macro.t(), keyword()) :: Macro.t()

Defines a snapshot test that utilizes the test context.

Examples

describe "my_fun/3" do
  test_snapshot "works as expected", ctx do
    my_fun("foo", 123, ctx)
  end
end