forked from mirror/misskey
[WIP] test
This commit is contained in:
parent
00fbc45536
commit
1fefe5eba4
@ -2,9 +2,6 @@
|
|||||||
* API TESTS
|
* API TESTS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// During the test the env variable is set to test
|
|
||||||
process.env.NODE_ENV = 'test';
|
|
||||||
|
|
||||||
const chai = require('chai');
|
const chai = require('chai');
|
||||||
const chaiHttp = require('chai-http');
|
const chaiHttp = require('chai-http');
|
||||||
const should = chai.should();
|
const should = chai.should();
|
||||||
@ -35,6 +32,7 @@ describe('API', () => {
|
|||||||
.end((err, res) => {
|
.end((err, res) => {
|
||||||
res.should.have.status(200);
|
res.should.have.status(200);
|
||||||
res.body.should.be.a('object');
|
res.body.should.be.a('object');
|
||||||
|
res.body.should.have.property('username').eql(account.username);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
6
test/index.js
Normal file
6
test/index.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// During the test the env variable is set to test
|
||||||
|
process.env.NODE_ENV = 'test';
|
||||||
|
|
||||||
|
// Init babel
|
||||||
|
require('babel-core/register');
|
||||||
|
require('babel-polyfill');
|
Loading…
Reference in New Issue
Block a user