Testing for errors raised in a liveview

Open
#3,329 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
elixir
Domain
testing

Research direction

Reproduce the issue in a LiveView test using the Elixir 1.17.1, Phoenix 1.7.12, and LiveView 1.0.0-rc.0 versions listed. First determine how an exception currently reaches the test process, then establish an assertion approach that catches it and verifies the exception without crashing the test.

Written by the indexing model from the issue text.

Description

Environment
  • Elixir version (elixir -v): 1.17.1
  • Phoenix version (mix deps): 1.7.12
  • Phoenix LiveView version (mix deps): 1.0.0-rc.0
  • Operating system: Mac OS
  • Browsers you attempted to reproduce this bug on (the more the merrier):
  • Does the problem persist after removing "assets/node_modules" and trying again? Yes/no:
Actual behavior

An exception in the LV crashes the test.

Expected behavior

Some way to catch the exception and at best assert on it.

Dominant language
Elixir
Stars
6.8k
Forks
1.1k
Avg merge
1d 3h
Merged PRs (30d)
19

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from phoenixframework/phoenix_live_view

All issues in phoenixframework/phoenix_live_view

Similar issues

More Elixir issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.