Some problems that either need to be addressed in the README or fixed somehow to be less error prone in codebase:
Code always tries to read .env variables with handlebars, even when there are none, resulting in error messages being displayed each time that state
Like this
About to read file: C:\Users\Hannah Bulmer\elastic.json
File does not exist: C:\Users\Hannah Bulmer\elastic.json
File C:\Users\Hannah Bulmer\.env does not exist
FIXED - Fixtures quit immediate after mistying
When given the option to select your fixture, if you type one that is wrong the program immediately quites.
A neat solution to fix this would be to use inquirer.js or a similar prompting library to provide the fixture options as a selectable list, rather than being given the options and having to type it yourself
Furthermore, if there are no fixtures within the fixture object, you should not have the option to select '' as a fixture and have the program immdiately error out, like it currently does.
FIXED - if process doesn't end with an emit.end() statement, the code never ends
Add the rest of the this.emit() options to the event emitter
These are
FIXED If data is returned from process and not emitted, it should still be printed to the console somewhere at some point
Improve error messages
Things like missing msg in the fixtures file and such are easy to throw human-readable errors for, rather than printing the stack to screen for every error as it does now. We should improve this error handling to make building new portions of the program easier as well.
Sometimes messages have colours for error messages and stuff, and sometimes they don't. This should probably be more consistent
FIXED - Provide somewhere a blank fixtures template, maybe in the README?
FIXED Improve the search for the test/fixtures.json file.
Currently, this code is very messy and error-prone. One solution is to have user provide a path to the component as a flag and then the action/trigger name as a separate flag, but keeping the current mechanism we need to devise a smarter way to determine the location of test/fixtures.json that doesn't rely on a line like while (curDirectory !== '/'), which isn't compatible on non Macs.
Some problems that either need to be addressed in the README or fixed somehow to be less error prone in codebase:
Code always tries to read
.env
variables with handlebars, even when there are none, resulting in error messages being displayed each time that state Like thisFIXED - Fixtures quit immediate after mistying When given the option to select your fixture, if you type one that is wrong the program immediately quites.
A neat solution to fix this would be to use
inquirer.js
or a similar prompting library to provide the fixture options as a selectable list, rather than being given the options and having to type it yourself Furthermore, if there are no fixtures within the fixture object, you should not have the option to select''
as a fixture and have the program immdiately error out, like it currently does.FIXED - if
process
doesn't end with anemit.end()
statement, the code never endsAdd the rest of the
this.emit()
options to the event emitter These areFIXED If data is returned from
process
and not emitted, it should still be printed to the console somewhere at some pointImprove error messages Things like missing
msg
in the fixtures file and such are easy to throw human-readable errors for, rather than printing the stack to screen for every error as it does now. We should improve this error handling to make building new portions of the program easier as well.Sometimes messages have colours for error messages and stuff, and sometimes they don't. This should probably be more consistent
FIXED - Provide somewhere a blank fixtures template, maybe in the README?
FIXED Improve the search for the
test/fixtures.json
file. Currently, this code is very messy and error-prone. One solution is to have user provide a path to the component as a flag and then the action/trigger name as a separate flag, but keeping the current mechanism we need to devise a smarter way to determine the location oftest/fixtures.json
that doesn't rely on a line likewhile (curDirectory !== '/')
, which isn't compatible on non Macs.TODO: