| Current Path : /home/deltalab/PMS/partner-manager-backend/test/ |
| Current File : //home/deltalab/PMS/partner-manager-backend/test/channel.test.js |
/**
* This is a simple test example.
*
* You can use this as a template for other examples
*/
// DEPENDENCIES ====================================
const { expect, assert } = require('chai');
const mongoose = require('mongoose');
const { dotenv } = require('dotenv').config();
const channelService = require('../services/channel')
// RESOURCES =======================================
// TEST CASES ======================================
describe('channel', () => {
// Initialization --------------------------------
before((done) => {
mongoose.connect(process.env.database_url);
const db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error'));
db.once('open', function () {
console.log('We are connected to test database!');
done();
});
});
it('create sales channel', async () => {
const channel = await channelService.createChannel('Shopify');
await channel.save();
});
});