Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more database testing #31

Open
sbinlondon opened this issue Aug 10, 2018 · 1 comment
Open

Add more database testing #31

sbinlondon opened this issue Aug 10, 2018 · 1 comment

Comments

@sbinlondon
Copy link

tape("tape is working in database test file", t => {

But good to know 1 = 1 😉

@martingaston
Copy link

martingaston commented Aug 10, 2018

I'm also getting the below when I try and npm run test on a fresh database locally:


/home/martin/week-six/JEAH_DB_week/src/handler.js:3
skills ON offers.skill_id = skills.id;`);cov_7gisf3djj.s[28]++;const userHandler=(req,res)=>{cov_7gisf3djj.f[5]++;let result=(cov_7gisf3djj.s[29]++,{});cov_7gisf3djj.s[30]++;dbconnection.query(requestQuery,(err,requestData)=>{cov_7gisf3djj.f[6]++;cov_7gisf3djj.s[31]++;if(err){cov_7gisf3djj.b[2][0]++;cov_7gisf3djj.s[32]++;throw err;}else{cov_7gisf3djj.b[2][1]++;cov_7gisf3djj.s[33]++;result.requests=requestData.rows;cov_7gisf3djj.s[34]++;dbconnection.query(offerQuery,(err,offerData)=>{cov_7gisf3djj.f[7]++;cov_7gisf3djj.s[35]++;result.offers=offerData.rows;cov_7gisf3djj.s[36]++;res.writeHead(200,{'Content-Type':'application/json'});cov_7gisf3djj.s[37]++;res.end(JSON.stringify(result));});}});};cov_7gisf3djj.s[38]++;const postHandler=(req,res)=>{cov_7gisf3djj.f[8]++;let data=(cov_7gisf3djj.s[39]++,"");cov_7gisf3djj.s[40]++;req.on('data',chunk=>{cov_7gisf3djj.f[9]++;cov_7gisf3djj.s[41]++;data+=chunk;});cov_7gisf3djj.s[42]++;req.on('end',()=>{cov_7gisf3djj.f[10]

error: relation "users" does not exist
    at Connection.parseE (/home/martin/week-six/JEAH_DB_week/node_modules/pg/lib/connection.js:553:11)
    at Connection.parseMessage (/home/martin/week-six/JEAH_DB_week/node_modules/pg/lib/connection.js:378:19)
    at Socket.<anonymous> (/home/martin/week-six/JEAH_DB_week/node_modules/pg/lib/connection.js:119:22)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at TCP.onread (net.js:597:20)`

All other tests pass :+1:```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants