Fix C# line counting and add test

This commit is contained in:
Edoardo Pirovano 2021-06-23 11:59:32 +01:00 committed by Edoardo Pirovano
parent d623a7a3f7
commit 68b68732c6
10 changed files with 86 additions and 24 deletions

View file

@ -24,6 +24,20 @@ test("ensure lines of code works for cpp and js", async (t) => {
});
});
test("ensure lines of code works for csharp", async (t) => {
const results = await countLoc(
path.join(__dirname, "../tests/multi-language-repo"),
[],
[],
[Language.csharp],
getRunnerLogger(true)
);
t.deepEqual(results, {
csharp: 10,
});
});
test("ensure lines of code can handle undefined language", async (t) => {
const results = await countLoc(
path.join(__dirname, "../tests/multi-language-repo"),