1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-18 20:59:44 +02:00

Add test libs, update dependencies

This commit is contained in:
Maksim Eltyshev 2020-08-20 15:35:46 +05:00
parent cd6d929cbf
commit 16acd1b49c
24 changed files with 1692 additions and 159 deletions

0
server/test/fixtures/.gitkeep vendored Normal file
View file

View file

View file

@ -0,0 +1,19 @@
const { expect } = require('chai');
describe('User (model)', () => {
before(async () => {
await User.create({
email: 'test@test.test',
password: 'test',
name: 'test',
});
});
describe('#find()', () => {
it('should return 1 user', async () => {
const users = await User.find();
expect(users).to.have.lengthOf(1);
});
});
});

View file

@ -0,0 +1,23 @@
const dotenv = require('dotenv');
const sails = require('sails');
const rc = require('sails/accessible/rc');
process.env.NODE_ENV = 'test';
before(function beforeCallback(done) {
this.timeout(5000);
dotenv.config();
sails.lift(rc('sails'), (error) => {
if (error) {
return done(error);
}
return done();
});
});
after(function afterCallback(done) {
sails.lower(done);
});

0
server/test/mocha.opts Normal file
View file