StephaneTrebel / ofix

OFX transaction ID fixer
1 stars 0 forks source link

Test files are not in the repo #1

Open tbaumann opened 3 months ago

tbaumann commented 3 months ago
[nix-shell:~/git/ofix]$ npm run test

> ofix@1.0.0 test
> jest

 FAIL  src/main.spec.ts
  ● Test suite failed to run

    ENOENT: no such file or directory, open '/home/tilli/git/ofix/test/CA20210928_184319_simple.ofx'

       5 |
       6 | import { main, fixFITID } from './main';
    >  7 | const mockFile = readFileSync(
         |                              ^
       8 |   join(__dirname, '../test/CA20210928_184319_simple.ofx'),
       9 |   {
      10 |     encoding: 'utf8',

      at Object.<anonymous> (src/main.spec.ts:7:30)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        1.909 s
Ran all test suites.
StephaneTrebel commented 3 months ago

Hi ! Hmm, it's been a while since I checked out this repo… will look into it

Thanks for your issue ! :+1:

tbaumann commented 3 months ago

No worries. I ended up going with a different library. There were more problems (with the ofx library upstream) . It just couldn't parse my files as they were still not valid XML after the "SGML conversion". https://github.com/jseutter/ofxparse/ was more tolerant. Since the whole objective of this was to fix my broken files this was the only solution. :D

But by all means, if you feel like fixing it. ;)