conde-nast-international / tftest

Terraform Testing Tool
Other
0 stars 1 forks source link

Running tests throws an exception #51

Open tomgco opened 6 years ago

tomgco commented 6 years ago
/home/tomgco/.nvm/versions/node/v8.11.4/lib/node_modules/@condenast/tftest/lib/filesystem.js:45
    tmpTests.forEach((test) => {
             ^

TypeError: tmpTests.forEach is not a function
    at getFolderTests (/home/tomgco/.nvm/versions/node/v8.11.4/lib/node_modules/@condenast/tftest/lib/filesystem.js:45:14)
    at Object.discoverTests (/home/tomgco/.nvm/versions/node/v8.11.4/lib/node_modules/@condenast/tftest/lib/filesystem.js:86:10)
    at new Runner (/home/tomgco/.nvm/versions/node/v8.11.4/lib/node_modules/@condenast/tftest/lib/runner.js:13:52)
    at Command.program.command.description.option.option.action (/home/tomgco/.nvm/versions/node/v8.11.4/lib/node_modules/@condenast/tftest/bin/tftest:23:25)
    at Command.listener (/home/tomgco/.nvm/versions/node/v8.11.4/lib/node_modules/@condenast/tftest/node_modules/commander/index.js:315:8)
    at emitTwo (events.js:126:13)
    at Command.emit (events.js:214:7)
    at Command.parseArgs (/home/tomgco/.nvm/versions/node/v8.11.4/lib/node_modules/@condenast/tftest/node_modules/commander/index.js:654:12)
    at Command.parse (/home/tomgco/.nvm/versions/node/v8.11.4/lib/node_modules/@condenast/tftest/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/home/tomgco/.nvm/versions/node/v8.11.4/lib/node_modules/@condenast/tftest/bin/tftest:93:9)
kenichi-shibata commented 6 years ago

I think i encountered this before try using v8.9.11

kenichi-shibata commented 6 years ago

but yes this is an issue we could restrict the node engine version if need be

tomgco commented 6 years ago

but yes this is an issue we could restrict the node engine version if need be

This isn't the node version, it is a bug when tmpTests is not an array, we need to check and output a human-readable error message.