Plato on Github
Report Home
test/spec/resource.js
Maintainability
147.31
Lines of code
35
Difficulty
5.48
Estimated Errors
0.26
Function weight
By Complexity
By SLOC
define('spec/resource', ['lyria/resource'], function(Resource) { describe('lyria/resource', function() { it('is an object', function() { expect(Resource).to.be.a('object'); }); it('.path', function() { expect(Resource).to.have.property('path'); expect(Resource.path).to.be.a('object'); }); describe('.name', function() { it('does exist', function() { expect(Resource).to.have.property('name'); expect(Resource.name).to.be.a('function'); }); it('calling without parameters', function() { expect(Resource.name()).to.equal(undefined); }); it('calling without type parameter', function() { expect(Resource.name('test')).to.be.a('string'); }); it('calling with filename and type parameter', function() { expect(Resource.name('test', 'image')).to.be.a('string'); }); }); }); });