feat(core): Added new afterburner logic for specific bank reference
This commit is contained in:
20
test/test.ts
Normal file
20
test/test.ts
Normal 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();
|
Reference in New Issue
Block a user