datopian / ckan-integration-tests

Cypress toolkit to run integration tests against a CKAN instance
https://tech.datopian.com/ckan/
MIT License
4 stars 3 forks source link

Feature/add mocha tests tweaks #13

Closed kmanaseryan closed 3 years ago

kmanaseryan commented 3 years ago

Related issue: #9

cuducos commented 3 years ago

Closes #10

kmanaseryan commented 3 years ago

Great, thank you guys! I see the other commits here, thanks for the fixes @cotts 👍

I would prefer to have CKAN client and Fricitionless as dependencies (rather than development dependencies) because the aim of this repo is to be NPM-installed by other projects. Keeping these dependencies in dependencies instead of devDependencies avoids missing packages in this third parties, NPM-installed scenario.

For example: let's say the Government of Foo Bar Republic is my client and I install a CKAN instance for them. I can create a ckan-foo-bar-uat in which I would npm install ckan-integration-tests — keeping the CKAN client and Frictionless in devDependencies would not install these packages in my newly created repo, right?

@cuducos OK, I got you, actually was not clear on this and put there in order to bring attention. So my point is that how we can make sure that the versions we use are the right ones? I mean if we have a client X who uses some CKAN app based on let's say React (e.g. datapub), which uses some specific version of ckan-client-js and frictionless-js then shouldn't we provide those libs from that app to our tests? Or alternatively those libs will be installed by that app. For example if we try to install datapub it will automatically install those libs, as those libs are already listed in the dependencies.

I think maybe instead of devDependencies we should use peerDependencies?

cuducos commented 3 years ago

Wow… didn't known about peerDependencies — sounds like a good use case for that!