All files / test QueenTest.js

93.75% Statements 15/16
50% Branches 1/2
100% Functions 6/6
93.75% Lines 15/16

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    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 Queen from '../scripts/Queen.js';
 
describe('Clase Queen tests', ()=>{
 
  describe('Comportamiento del constructor', ()=>{
    it('Debería generar un objeto Queen', () => {
      let QueenTest = new Queen();
      expect(QueenTest).to.be.a('Object');
    });
  });
 
  describe('Métodos de la clase', () => {
    it ('Tiene que tener un método para poder dibujar un Queen', () => {
      let QueenTest = new Queen();
      expect(QueenTest.draw).to.exist;
    });
    it ('draw tiene que poder ser ejecutado sin errores', () => {
      let QueenTest = new Queen();
      expect(QueenTest.draw()).not.to.throw;
    });
  });
});