Skip to content

Commit

Permalink
Fixup failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
desplesda committed Sep 13, 2023
1 parent db33733 commit 058f35a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions YarnSpinner.LanguageServer.Tests/LanguageServerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ public async Task Server_OnChangingDocument_SendsNodesChangedNotification()

nodeInfo.Uri.ToString().Should().Be("file://" + filePath, "because this is the URI of the file we opened");

nodeInfo.Nodes.Should().HaveCount(3, "because there are three nodes in the file before we make changes");
nodeInfo.Nodes.Should().HaveCount(4, "because there are three nodes in the file before we make changes");

var nodesChanged = GetNodesChangedNotificationAsync((nodesResult) =>
nodesResult.Uri.AbsolutePath.Contains(filePath)
);
ChangeTextInDocument(client, filePath, new Position(20, 0), "title: Node3\n---\n===\n");
nodeInfo = await nodesChanged;

nodeInfo.Nodes.Should().HaveCount(4, "because we added a new node");
nodeInfo.Nodes.Should().HaveCount(5, "because we added a new node");
nodeInfo.Nodes.Should().Contain(n => n.Title == "Node3", "because the new node we added has this title");
}

Expand Down
2 changes: 1 addition & 1 deletion YarnSpinner.LanguageServer.Tests/WorkspaceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void Projects_CanOpen()

// Then
project.Files.Should().HaveCount(1);
project.Nodes.Should().HaveCount(3);
project.Nodes.Should().HaveCount(4);
project.Files.Should().AllSatisfy(file => file.Project.Should().Be(project));

var testFilePath = DocumentUri.FromFileSystemPath(Path.Combine(TestUtility.PathToTestWorkspace, "Project1", "Test.yarn"));
Expand Down

0 comments on commit 058f35a

Please sign in to comment.