| 27 | } |
| 28 | |
| 29 | const testGood = (test) => { |
| 30 | const fullPath = path.join(__dirname, 'savegame', 'testcollect.csv') |
| 31 | |
| 32 | return new csvFileChecker(fullPath, false).getInfo().then((results) => { |
| 33 | if ( results.mapMod !== null ) { |
| 34 | test.step('Got expected map name') |
| 35 | } else { |
| 36 | test.error('Got unexpected map name') |
| 37 | } |
| 38 | |
| 39 | if ( Object.keys(results.farms).length === 2 ) { |
| 40 | test.step('Got expected number of farms (2 [default])') |
| 41 | } else { |
| 42 | test.error('Got unexpected number of farms') |
| 43 | } |
| 44 | |
| 45 | if ( Object.keys(results.mods).length === 166 ) { |
| 46 | test.step('Got expected number of mods (166)') |
| 47 | } else { |
| 48 | test.error('Got unexpected number of mods') |
| 49 | } |
| 50 | }).catch((err) => { |
| 51 | test.error(`Unexpected Error :: ${err}`) |
| 52 | }).finally(() => { |
| 53 | test.end() |
| 54 | }) |
| 55 | } |