diff --git a/simple-object-test/object-test/test.js b/simple-object-test/object-test/test.js new file mode 100644 index 0000000..c138396 --- /dev/null +++ b/simple-object-test/object-test/test.js @@ -0,0 +1,19 @@ +const chai = require('chai'); +const expect = chai.expect; +const cool = require('../object'); + +describe('Object test', () => { + it('should have the name Coolman', ()=> { + expect(cool.name).to.eql('Coolman'); + }) + it('should have the job Beertender', () => { + expect(cool.job).to.eql('Beertender'); + }) + it('should have the age of 25', ()=> { + expect(cool.age).to.be.at.least(24); + }) + it('should have greeted a person by name', ()=> { + var testPerson = cool.greet('Dan'); + expect(testPerson).to.eql('hello Dan') + }) +}) diff --git a/simple-object-test/object.js b/simple-object-test/object.js new file mode 100644 index 0000000..64831f1 --- /dev/null +++ b/simple-object-test/object.js @@ -0,0 +1,8 @@ +exports = module.exports = {}; + +exports.name = 'Coolman'; +exports.job = 'Beertender'; +exports.age = '25'; +exports.greet = function (name){ + return 'hello ' + name; +};