cli
cli copied to clipboard
test: add integration test to test generated TS client
Closes #2382
Are these tests for the current or the new client? We might not want to invest in testing Vuex, because it is on its way out.
Are these tests for the current or the new client? We might not want to invest in testing Vuex, because it is on its way out.
The tests are for the typescript client related code, but is true that right now it can be misleading as we have to run npm install in the "vue" folder because of the cosmos package dependencies.
@ilgooz should we wait for the Vue / TS client refactor PR to be finished ? I am not sure if otherwise we would need a small refactor for the tests, I am thinking we might.
This PR is about preparing the environment for testing the generated JS code. There is also one test to test the generic client (generic client's API won't be changed by the refactor), rest of the tests including for the ones related to Vuex should be added by @ignite-hq/web.
We don't need to wait code generation refactoring to be finished to merge this PR, they're not relevant.
@jeronimoalbi I merged develop and surprisingly the tests are working, maybe it's not working on my machine because of the npm version...
$ npm version
{
npm: '8.18.0',
node: '18.7.0',
v8: '10.2.154.13-node.9',
uv: '1.43.0',
zlib: '1.2.12',
brotli: '1.0.9',
ares: '1.18.1',
modules: '108',
nghttp2: '1.48.0',
napi: '8',
llhttp: '6.0.7',
openssl: '1.1.1q',
cldr: '41.0',
icu: '71.1',
tz: '2022a',
unicode: '14.0'
}
@jeronimoalbi on my machine, the cosmosgen tests are failing with this error :
--- FAIL: TestBankModule (6.60s)
exec.go:109:
Error Trace: /home/tom/src/ignite/cli/integration/cosmosgen/exec.go:109
/home/tom/src/ignite/cli/integration/cosmosgen/bank_module_test.go:66
Error: Received unexpected error:
exit status 1
Test: TestBankModule
Messages: generate vuex store
Logs:
cannot build app:
lstat /home/tom/go/pkg/mod/github.com/cosmos/[email protected]/x/group/module: no such file or directory
Any hint ?
@jeronimoalbi on my machine, the cosmosgen tests are failing. Any hint ?
Actually no, I will run it locally to see if I can figure it out but I would recommend to wait until #2143 is merged, which should happen soon, before working on this branch because it needs some changes to get fully up to date. Once the related PR is merged I will work on this to bring it up to date.