How can I make Mix run only specific tests from my suite of tests?

There are 5 ways to run only specific tests with Elixir run a single file with mix test path_to_your_tests/your_test_file.exs This will run all test defined in your_test_file.exs run a specific test from a specific test file by adding a colon and the line number of that test for example mix test path_to_your_tests/your_test_file.exs:12 will run the … Read more

Add new element to list

Just follow the Elixir docs to add an element to a list ( and keep performance in mind =) ): iex> list = [1, 2, 3] iex> [0 | list] # fast [0, 1, 2, 3] iex> list ++ [4] # slow [1, 2, 3, 4] https://hexdocs.pm/elixir/List.html

How do I recompile an Elixir project and reload it from within iex?

You can use the IEx.Helpers.recompile/0 function. Recompiles the current Mix application. This helper only works when IEx is started with a Mix project, for example, iex -S mix. Before compiling the code, it will stop the current application, and start it again afterwards. Stopping applications are required so processes in the supervision tree won’t crash … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)