mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-01-27 01:46:25 -07:00
[WIP] test
This commit is contained in:
parent
1889979fd5
commit
e3de444e10
1 changed files with 28 additions and 1 deletions
29
test/api.js
29
test/api.js
|
@ -7,7 +7,34 @@ process.env.NODE_ENV = 'test';
|
||||||
|
|
||||||
const chai = require('chai');
|
const chai = require('chai');
|
||||||
const chaiHttp = require('chai-http');
|
const chaiHttp = require('chai-http');
|
||||||
const server = require('../built/server');
|
|
||||||
const should = chai.should();
|
const should = chai.should();
|
||||||
|
|
||||||
chai.use(chaiHttp);
|
chai.use(chaiHttp);
|
||||||
|
|
||||||
|
const server = require('../built/api/server');
|
||||||
|
|
||||||
|
describe('API', () => {
|
||||||
|
describe('posts/create', () => {
|
||||||
|
it('simple', done => {
|
||||||
|
const post = {
|
||||||
|
text: 'Hi'
|
||||||
|
};
|
||||||
|
chai.request(server)
|
||||||
|
.post('/posts/create')
|
||||||
|
.send(post)
|
||||||
|
.end((err, res) => {
|
||||||
|
res.should.have.status(200);
|
||||||
|
res.body.should.be.a('object');
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('reply', () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('repost', () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in a new issue