This repository has been archived on 2023-08-07. You can view files and clone it, but cannot push or open issues or pull requests.
temple/test/temple/ast/default_test.exs

30 lines
571 B
Elixir

defmodule Temple.Ast.DefaultTest do
use ExUnit.Case, async: true
alias Temple.Ast.Default
describe "applicable?/1" do
test "returns true when the node is an elixir expression" do
ast =
quote do
Foo.bar!(baz)
end
assert Default.applicable?(ast)
end
end
describe "run/2" do
test "adds a elixir expression node to the buffer" do
expression =
quote do
Foo.bar!(baz)
end
ast = Default.run(expression)
assert %Default{elixir_ast: expression} == ast
end
end
end