ImmortalDB icon indicating copy to clipboard operation
ImmortalDB copied to clipboard

How do we run tests?

Open jcar787 opened this issue 7 years ago • 9 comments
trafficstars

I don't see any test script here in package.json. How are you guys running tests? I think this should be added, also to maintain consistency accross the team we can add prettier and eslint. Let me know your thoughts, I'm really excited about this

jcar787 avatar Oct 30 '18 01:10 jcar787

Would be good to have some tests, probably based on puppeteer and Browserstack.

DanielRuf avatar Oct 30 '18 07:10 DanielRuf

Thus far, I've run a simple webserver in the root directory

$ http-server -p 5050 &
$ google-chrome "http://localhost:5050/testing/test.html"

and tested manually via testing/test.html. This is, obviously, boorish.

IronDB needs automated tests.

Until I get around to this, pull requests graciously welcome.

gruns avatar Nov 02 '18 18:11 gruns

IIn the PR I did for using lodash functions instead of the whole library, I added a webpack-server to make the test in the browser easier using npm run serve. I can add that again if you want. Also we can add another set of unit tests using jest and then add the tests using puppeteer. That's my thought at least. Let me know. If that works.

jcar787 avatar Nov 02 '18 19:11 jcar787

IIn the PR I did for using lodash functions instead of the whole library, I added a webpack-server to make the test in the browser easier using npm run serve. I can add that again if you want.

I saw that. That was great. So great, I added it back out of band.

  • https://github.com/gruns/ImmortalDB/blob/master/package.json#L12

Thank you.

Also we can add another set of unit tests using jest and then add the tests using puppeteer. That's my thought at least. Let me know. If that works.

That would awesome; ImmortalDB needs automated tests.

Do you have experience with Jest and/or Puppeteer? Would you be able to start on such tests?

gruns avatar Dec 04 '18 19:12 gruns

Sorry, for the delay in my response. I have experience on Jest no Puppeteer. I can start working in some jest tests and leave the door open for Puppeteer if someone else likes to take that task.

jcar787 avatar Dec 13 '18 16:12 jcar787

Afaik there is jest-puppeteer to simplify the integration.

DanielRuf avatar Dec 13 '18 16:12 DanielRuf

https://www.npmjs.com/package/jest-puppeteer

DanielRuf avatar Dec 13 '18 16:12 DanielRuf

I can start working in some jest tests and leave the door open for Puppeteer if someone else likes to take that task.

Awesome. Tests will be sick.

I have no experience with Jest nor Puppeteer, but let me know if/where I can help provide input.

gruns avatar Dec 14 '18 22:12 gruns

Until automated tests have been built, the webpack-dev-server can be started, and the test page testing/test.html automatically opened, with:

$ npm start

gruns avatar Jan 17 '19 00:01 gruns