feat(core): Added new afterburner logic for specific bank reference

This commit is contained in:
2024-07-06 15:50:51 +02:00
commit 71ca4a0c6d
14 changed files with 6769 additions and 0 deletions

20
test/test.ts Normal file
View File

@ -0,0 +1,20 @@
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
import * as tapbundleFs from '@push.rocks/tapbundle-fs';
import * as mt940parser from '../ts/index.js';
let testMt940Parser: mt940parser.Mt940Parser;
tap.test('should create a valid instance of Mt940Parser', async () => {
testMt940Parser = new mt940parser.Mt940Parser();
});
tap.test('should parse a set of files', async () => {
const smartfiles = await tapbundleFs.smartfile.fs.fileTreeToObject('.nogit/', '*.mt940');
console.log(smartfiles);
for (const smartfile of smartfiles) {
const statements = await testMt940Parser.parseMt940FileString(smartfile.contents.toString());
console.log(JSON.stringify(statements, null, 2));
}
})
tap.start();