ShinGecko / neKo-Api

Api provided to support the innovative chat neKo
ISC License
0 stars 1 forks source link

Tests on DB #3

Open justinrlle opened 7 years ago

justinrlle commented 7 years ago

We should do basic tests on the DB, primarily regressions tests. I'm not at ease with the current testing framework, @Shenrak, could you give me some direction?

If I'm not misunderstood, a test to check that we do connect to the database would like that way:

describe('Check database connection', () => {
  it('Should connect to database', done => {
    require('../app/utils/thinky')
    done()
  })
})

Or is the done thing only for asynchronous actions?

Shenrak commented 7 years ago

done() (from what i've understood) is the callback that's called to say "hey, the test is over, you can check if everything is alright and go to the following test !

About the test you wrote, I don't know if you'll get a proper response...