Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | let expect; Eif (typeof require !== 'undefined') { // Execution in node expect = require('chai').expect; } else { // Execution in browser expect = chai.expect; } import Layers from '../scripts/Layers.js' describe('Clase Layers tests', ()=>{ describe('Comportamiento del constructor', ()=>{ it('Debería generar un objeto Layers', () => { let LayersTest = new Layers(); expect(LayersTest).to.be.a('Object'); }); it('Debería tener los siguientes atriburos miembro:', () => { let LayersTest = new Layers(); expect(LayersTest).to.have.property('elements'); }); }); describe('Métodos de la clase', () => { it ('Tiene que tener un método para poder dibujar un Layers', () => { let LayersTest = new Layers(); expect(LayersTest.draw).to.exist; }); it ('draw tiene que poder ser ejecutado sin errores', () => { let LayersTest = new Layers(); expect(LayersTest.draw()).not.to.throw; }); }); }); |