fbinnzhivko

Untitled

Oct 26th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. describe ("isSymmetric(arr)", function () {
  2.     it("should return true for [1, 2, 3, 3, 2, 1]", function() {
  3.         let symmetric = isSymmetric([1, 2, 3, 3, 2, 1]);
  4.         expect(symmetric([1, 2, 3, 3, 2, 1])).to.be.equal(true);
  5.     });
  6.     it("should return true for [-1, 2, -1]", function() {
  7.         let symmetric = isSymmetric([-1, 2, -1]);
  8.         expect(symmetric).to.be.equal(true);
  9.     });
  10.     it("should return false for [1, 2]", function() {
  11.         let symmetric = isSymmetric([1, 2]);
  12.         expect(symmetric).to.be.equal(false);
  13.     });
  14.     it("should return false for [1, 2, 3, 4, 2, 1]", function() {
  15.         let symmetric = isSymmetric([1, 2, 3, 4, 2, 1]);
  16.         expect(symmetric).to.be.equal(false);
  17.     });
  18.     it("should return false for [-1, 2, 1]", function() {
  19.         let symmetric = isSymmetric([-1, 2, 1]);
  20.         expect(symmetric).to.be.equal(false);
  21.     });
  22.     it("should return true for [1]", function() {
  23.         let symmetric = isSymmetric([1]);
  24.         expect(symmetric).to.be.equal(true);
  25.     });
  26.     it("should return true for [5, 'hi', {a:5}, new Date(), {a:5}, 'hi', 5]", function() {
  27.         let symmetric = isSymmetric([5, 'hi', {a:5}, new Date(), {a:5}, 'hi', 5]);
  28.         expect(symmetric).to.be.equal(true);
  29.     });
  30.     it("should return false for [5, 'hi', {a:5}, new Date(), {X:5}, 'hi', 5]", function() {
  31.         let symmetric = isSymmetric([5, 'hi', {a:5}, new Date(), {X:5}, 'hi', 5]);
  32.         expect(symmetric).to.be.equal(false);
  33.     });
  34.     it("should return false for 1,2,2,1", function() {
  35.         let symmetric = isSymmetric(1,2,2,1);
  36.         expect(symmetric).to.be.equal(false);
  37.     });
  38.     it("should return true for []", function() {
  39.         let symmetric = isSymmetric([]);
  40.         expect(symmetric).to.be.equal(true);
  41.     });
  42. });
Add Comment
Please, Sign In to add comment