Created
January 17, 2018 23:51
-
-
Save doomsbuster/836cbdef8f78503aa45680025e5edb1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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