2019-11-06 14:42:39 +07:00
|
|
|
const should = require('should');
|
|
|
|
const sinon = require('sinon');
|
|
|
|
|
2020-03-30 16:26:47 +01:00
|
|
|
const labs = require('../../../core/server/services/labs');
|
2019-11-06 14:42:39 +07:00
|
|
|
|
|
|
|
describe('Labs Service', function () {
|
|
|
|
afterEach(function () {
|
|
|
|
sinon.restore();
|
|
|
|
});
|
|
|
|
|
2021-02-17 12:24:54 +13:00
|
|
|
it('always returns members true flag', function () {
|
|
|
|
labs.getAll().should.eql({
|
|
|
|
members: true
|
|
|
|
});
|
2019-11-06 14:42:39 +07:00
|
|
|
|
2021-02-17 12:24:54 +13:00
|
|
|
labs.isSet('members').should.be.true;
|
2019-11-06 14:42:39 +07:00
|
|
|
});
|
|
|
|
|
|
|
|
it('isSet returns false for undefined', function () {
|
|
|
|
labs.isSet('bar').should.be.false;
|
|
|
|
});
|
|
|
|
|
|
|
|
it('isSet always returns false for deprecated', function () {
|
|
|
|
labs.isSet('subscribers').should.be.false;
|
|
|
|
labs.isSet('publicAPI').should.be.false;
|
|
|
|
});
|
|
|
|
});
|