HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/frenchy/www/french-american.org/current/node_modules/@frctl/fractal/test/core.source.js
'use strict';

const chai    = require('chai');
const expect  = chai.expect;

const fractal = require('../src/fractal')();
const Source  = require('../src/core/entities/source');

describe('EntitySource', function(){

    let source;

    beforeEach(function(){
        source = new Source('foo', fractal);
    });

    describe('.label', function(){
        it('has a label generated from it\'s name', function(){
            expect(source.label).to.equal('Foo');
        });
    });

    describe('.title', function(){
        it('has a title the same as it\'s label', function(){
            expect(source.title).to.equal('Foo');
        });
    });

    it('is an event emitter', function(){
        expect(source.hasMixedIn('Emitter')).to.be.true;
    });
    it('is configurable', function(){
        expect(source.hasMixedIn('Configurable')).to.be.true;
    });
    it('is a collection', function(){
        expect(source.hasMixedIn('Collection')).to.be.true;
    });

});