const Controller = require('../../lib/controllers/project.js');

const Code = require('code');
const Lab = require('lab');

var lab = exports.lab = Lab.script();
var describe = lab.describe;
var it = lab.it;
var expect = Code.expect;

describe('projectController', function () {
  describe('project.isSupported', function () {
    var runtime, srcVersion, supported;

    it('returns true when version is greater than min version', function (done) {
      supported = Controller.isSupported('1.3.3', 'Meteor');
      expect(supported).to.equal(true);
      done();
    });

    it('returns false when version is less than min supported version', function (done) {
      supported = Controller.isSupported('1.2.5', 'Meteor');
      expect(supported).to.equal(false);
      done();
    });

    it('return true when runtime is not Meteor', function (done) {
      supported = Controller.isSupported('5.9.0', 'Node.js');
      expect(supported).to.equal(true);
      done();
    });
  });
});
@@ -361,16 +361,75 @@
 orted;%0A%0A
+    describe('project.isSupported passes', function () %7B%0A  
     it('
@@ -494,32 +494,34 @@
 nction (done) %7B%0A
+  
       supported 
@@ -563,32 +563,34 @@
 Meteor');%0A      
+  
 expect(supported
@@ -599,32 +599,34 @@
 to.equal(true);%0A
+  
       done();%0A  
@@ -619,37 +619,736 @@
     done();%0A    
+  
 %7D);%0A%0A
+      it('return true when runtime is not Meteor', function (done) %7B%0A        supported = Controller.isSupported('5.9.0', 'Node.js');%0A        expect(supported).to.equal(true);%0A        done();%0A      %7D);%0A%0A      it('returns true on passing non-semver version', function (done) %7B%0A        supported = Controller.isSupported('1.3.3.4', 'Meteor');%0A        expect(supported).to.equal(true);%0A        done();%0A      %7D);%0A%0A      it('returns true when major is greater than min supported major', function (done) %7B%0A        supported = Controller.isSupported('2.0.0', 'Meteor');%0A        expect(supported).to.equal(true);%0A        done();%0A      %7D);%0A    %7D);%0A%0A    describe('project.isSupported fails', function () %7B%0A  
     it('returns 
@@ -1413,32 +1413,34 @@
 nction (done) %7B%0A
+  
       supported 
@@ -1482,32 +1482,34 @@
 Meteor');%0A      
+  
 expect(supported
@@ -1523,24 +1523,26 @@
 ual(false);%0A
+  
       done()
@@ -1543,29 +1543,33 @@
 done();%0A    
+  
 %7D);%0A%0A
+  
     it('retu
@@ -1574,40 +1574,242 @@
 turn
- tru
+s fals
 e when 
-r
+major does not pass', f
 un
+c
 ti
-me is not Meteor
+on (done) %7B%0A        supported = Controller.isSupported('0.3.4', 'Meteor');%0A        expect(supported).to.equal(false);%0A        done();%0A      %7D);%0A%0A      it('returns false when minor does not pass
 ', f
@@ -1821,24 +1821,26 @@
 on (done) %7B%0A
+  
       suppor
@@ -1869,36 +1869,37 @@
 ported('
-5.9.0', 'Node.js
+1.2.4', 'Meteor
 ');%0A
+  
       ex
@@ -1915,35 +1915,36 @@
 orted).to.equal(
-tru
+fals
 e);%0A      done()
@@ -1933,32 +1933,34 @@
 lse);%0A      
+  
 done();%0A
     %7D);%0A  %7D)
@@ -1943,24 +1943,34 @@
     done();%0A
+      %7D);%0A
     %7D);%0A  %7D)

Add more testing