Created
July 12, 2017 02:18
-
-
Save khaosdoctor/0f9d10a8233ae463667a90c58ccd29a4 to your computer and use it in GitHub Desktop.
Dummy example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TaskManager = function(){ | |
var taskList = []; | |
return { | |
addTask: function(task){ | |
taskList.push(task); | |
}, | |
tasksCount: function(){ | |
return taskList.length; | |
} | |
} | |
} | |
// Teste | |
describe('add task', (assert) => { | |
it('Exemplo de objeto Dummy', function(){ | |
var DummyTask = function(){ return {} }; | |
var taskManager = new TaskManager(); | |
taskManager.addTask(new DummyTask()); | |
taskManager.addTask(new DummyTask()); | |
assert.equal( taskManager.tasksCount(), 2 ); | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment