Skip to content

Commit

Permalink
Made test directories and naming consistent
Browse files Browse the repository at this point in the history
The test module is now Lexical.Test and all the files and directories
now respect that.
  • Loading branch information
scohen committed May 12, 2023
1 parent 16898c6 commit 0aa51f8
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 10 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Testing.EventualAssertions do
defmodule Lexical.Test.EventualAssertions do
@moduledoc """
Assertion macros for an eventually consistent world
Sometimes, despite our best efforts, we want to assert that some condition holds, but it doesn't
Expand Down
2 changes: 1 addition & 1 deletion apps/protocol/test/lexical/proto_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ defmodule Lexical.ProtoTest do
alias Lexical.Document
alias Lexical.Proto
alias Lexical.Proto.Convert
alias Lexical.Proto.Fixtures.LspProtocol
alias Lexical.Proto.LspTypes
alias Lexical.Protocol.Types
alias Lexical.Test.Protocol.Fixtures.LspProtocol

import LspProtocol

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Lexical.Proto.Fixtures.LspProtocol do
defmodule Lexical.Test.Protocol.Fixtures.LspProtocol do
def build(module_to_build, opts \\ []) do
true = Code.ensure_loaded?(module_to_build)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ defmodule Lexical.RemoteControl.Build.StateTest do
alias Lexical.RemoteControl.Build
alias Lexical.RemoteControl.Build.State

import Lexical.Test.EventualAssertions
import Lexical.Test.Fixtures
import Testing.EventualAssertions

use ExUnit.Case, async: false
use Patch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ defmodule Lexical.RemoteControl.ProjectNodeTest do
alias Lexical.RemoteControl.ProjectNode
alias Lexical.RemoteControl.ProjectNodeSupervisor

import Lexical.Test.EventualAssertions
import Lexical.Test.Fixtures
import Testing.EventualAssertions

use ExUnit.Case, async: false

Expand Down
2 changes: 1 addition & 1 deletion apps/remote_control/test/lexical/remote_control_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Lexical.RemoteControlTest do
alias Lexical.RemoteControl

use ExUnit.Case
use Testing.EventualAssertions
use Lexical.Test.EventualAssertions
import Lexical.Test.Fixtures

def start_project(%Project{} = project) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ defmodule Lexical.Test.Fixtures do
use ExUnit.CaseTemplate

def fixtures_path do
[__ENV__.file, "..", "..", "fixtures"]
[__ENV__.file, "..", "..", "..", "..", "fixtures"]
|> Path.join()
|> Path.expand()
end

def project(project_name) do
[Path.dirname(__ENV__.file), "..", "fixtures", to_string(project_name)]
[Path.dirname(__ENV__.file), "..", "..", "..", "fixtures", to_string(project_name)]
|> Path.join()
|> Path.expand()
|> Lexical.Document.Path.to_uri()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule Lexical.Server.Provider.Handlers.GoToDefinitionTest do
alias Lexical.Server.Provider.Env
alias Lexical.Server.Provider.Handlers

import Lexical.Proto.Fixtures.LspProtocol
import Lexical.Test.Protocol.Fixtures.LspProtocol
import Lexical.RemoteControl.Api.Messages
import Lexical.Test.Fixtures

Expand Down
2 changes: 1 addition & 1 deletion apps/server/test/lexical/server/provider/queue_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule Lexical.Server.Provider.QueueTest do

use ExUnit.Case
use Patch
use Testing.EventualAssertions
use Lexical.Test.EventualAssertions

setup do
{:ok, _} = start_supervised(Queue.Supervisor.child_spec())
Expand Down
File renamed without changes.

0 comments on commit 0aa51f8

Please sign in to comment.