Open
Description
Todos:
- learn about macros
- basic diff algorithm
- assert_value storing rhs in a file
- basic rhs heredoc support
- workaround asynchronous ExUnit I/O
- better errors where lhs is not what we can work with
- store file offsets when accepting with multiple heredocs
- assert_value with no rhs at all
- test for accepting/modifying heredocs
- full integration tests
- README/help
- better general handling of strings that don't end with \n
- when displaying diff, show File we are diffing, and the context of where assert_value was invoked from
Bugs:
- diff doesn't seem to report newline issues, e.g. with first test in integration test (may not be happening anymore)
Later:
- Investigate Standard Licence for Elixir
- TravisCI integration
- timeout business
- Async tests support
- Add help to prompt (accept "?" as answer)
- Improved interactive invocation with Y, N
- support for non-interactive invocation
- Add credo
- Hex package
Fancy work:
- Add CHANGELOG.md
- support other types for rhs, like numbers
- special case store strings with no newlines as plain string not heredoc
- better context for diff
- @doc and @moduledoc code documentation
- support hunks in diff
- refine and colorize diff
- automatically wrap assert_value arguments in parens as needed to conserve horizontal space
- support capturing and comparing exceptions (e.g. assert_value foo = raise RuntimeError, "aaa" )
- do not escape quotes in heredocs
Marketing:
- better README
- animated gif showing an example
- improve README.md
Bugs:
- diff is very slow on large diffs because List.myers_difference implementation is suboptimal
- precedence corner cases like assert_value foo = 1
Maybe:
- dynamically disable timeouts inside assert_value
- do not indent empty lines in expected values (otherwise there are a lot of trailing spaces)
- better name rather assert_value (e.g. insist, magic_assert, assert_interactive ?)
- pry integration
- canonicalization
- espec support ???
Will Not Do:
- Protocol based serialization (WND)
Refactoring:
- in macro "pass in"/unquote everything in the beginning
- touching file should only happen on y
- delete tmpdir after running
- in integration test output diffing sometimes flaps
- standardize lhs/rhs vs actual/expected
- FileChangeTracker
- add comment about --seed 0
- move integration test stuff into integration_test.exs
- break with unsupported rhs type at compile time
- more descriptive error on on unsupported rhs side
- possibly construct the ExUnit.AssertionError in the caller to make a sensible exception depending on whether or not we have rhs
- better replace function for the trailing \n, it can eat too much surprisingly
Metadata
Metadata
Assignees
Labels
No labels