Skip to content

Commit

Permalink
avoid noise from temp files when running tests locally
Browse files Browse the repository at this point in the history
  • Loading branch information
Viir committed Jan 18, 2025
1 parent 58a01f6 commit c6ab408
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions implement/test-elm-time/TestSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,18 @@ public static IImmutableDictionary<IReadOnlyList<string>, ReadOnlyMemory<byte>>
GetElmAppFromDirectoryPath(FilePathStringFromPath(directoryPath));

public static IImmutableDictionary<IReadOnlyList<string>, ReadOnlyMemory<byte>> GetElmAppFromDirectoryPath(
string directoryPath) =>
PineValueComposition.ToFlatDictionaryWithPathComparer(
Filesystem.GetAllFilesFromDirectory(directoryPath)
.OrderBy(file => string.Join('/', file.path)));
string directoryPath)
{
var files = Filesystem.GetAllFilesFromDirectory(directoryPath);

var filesFiltered =
LoadFromLocalFilesystem.RemoveNoiseFromTree(
PineValueComposition.SortedTreeFromSetOfBlobsWithStringPath(files),
discardGitDirectory: true);

return
PineValueComposition.TreeToFlatDictionaryWithPathComparer(filesFiltered);
}

public static IImmutableDictionary<IReadOnlyList<string>, ReadOnlyMemory<byte>> AsLoweredElmApp(
IImmutableDictionary<IReadOnlyList<string>, ReadOnlyMemory<byte>> originalAppFiles,
Expand Down

0 comments on commit c6ab408

Please sign in to comment.