 
     assert [type: {:kw, {:remote_type, _, [{:atom, _, Keyword}, {:atom, _, :t}, []]}, _},
             type: {:kw, {:remote_type, _, [{:atom, _, Keyword}, {:atom, _, :t}, [{:var, _, :value}]]}, [{:var, _, :value}]}] =
-      types(module)
+           types(bytecode)
   end
 
   test "invalid remote @type with module attribute that does not evaluate to a module" do

             {:type, _, :tuple, [
               {:atom, 0, :timestamp}, {:type, 0, :term, []}, {:atom, 0, :foo}
             ]},
            []}] = types(module)
  end

  test "@type with private record" do
    module = test_module do
      require Record
      Record.defrecordp :timestamp, [date: 1, time: 2]
      @type my_type :: record(:timestamp, time: :foo)

               {:type, _, :map_field_exact, [{:atom, _, :a}, {:atom, _, :b}]},
               {:type, _, :map_field_assoc, [{:atom, _, :c}, {:atom, _, :d}]}
             ]},
            []}] = types(bytecode)
  end

  test "@type with a struct" do
    bytecode = test_module do
      defstruct [hello: nil, other: nil]
      @type my_type :: %TestTypespec{hello: :world}
    end
