Skip to content

Instantly share code, notes, and snippets.

@doomsbuster
Created January 17, 2018 23:51
Show Gist options
  • Save doomsbuster/836cbdef8f78503aa45680025e5edb1a to your computer and use it in GitHub Desktop.
Save doomsbuster/836cbdef8f78503aa45680025e5edb1a to your computer and use it in GitHub Desktop.
let request = require('supertest');
let chai = require('chai');
const ENDPOINT = 'http://localhost:10000';
describe('Grafeas API Spec Test', function(){
it ('should return a list of all projects', (done) => {
return request(ENDPOINT)
.get('/v1alpha1/projects')
.expect(200)
.then((response) => {
console.log(response.body);
done();
})
})
it('should create a new project', (done) => {
return request(ENDPOINT)
.post('/v1alpha1/mrdoomsbuster')
.expect(200)
.then((data) => {
console.log(data);
done();
}).catch((err) => {
console.log(err);
done(err);
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment