Skip to content

Commit 22bb4dd

Browse files
committed
chore: log when updating test telegrams
1 parent 20d68d2 commit 22bb4dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/update-test-telegrams.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-console */
12
/**
23
* This scripts reads all .txt files in the tests/telegrams folder, parses them and writes the
34
* result to a .json file. Only run this script if you want to update the expected output of the
@@ -12,6 +13,7 @@ const testCases = [...new Set(files.map((file) => file.replace('.txt', '').repla
1213
for (const file of testCases) {
1314
let input = await fs.readFile(`./tests/telegrams/${file}.txt`, 'utf-8');
1415
input = input.replace(/\r?\n/g, '\r\n');
16+
console.log(`Parsing ${file}.txt`);
1517
const parsed = DSMR.parse({ telegram: input });
1618
const json = JSON.stringify(parsed, null, 2);
1719
await fs.writeFile(`./tests/telegrams/${file}.json`, json);

0 commit comments

Comments
 (0)