You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<aclass="btn btn-default" data-toggle="collapse" href="#serviceTestCode" aria-expanded="false" aria-controls="serviceTestCode">Toggle service test code</a>
56
+
57
+
<br/>
58
+
<br/>
59
+
<preclass="collapse" id="serviceTestCode">
60
+
<codeclass="javascript">
61
+
import { assert } from 'chai';
62
+
63
+
import TodoService from './todo.service.js';
64
+
65
+
let service;
66
+
67
+
describe('TodoService', function() {
68
+
69
+
beforeEach(function() {
70
+
service = TodoService();
71
+
});
72
+
73
+
it('should contain empty todos after initialization', function () {
74
+
assert.equal(service.todos.length, 0);
75
+
});
76
+
77
+
it('should add todo', function () {
78
+
service.addTodo('Finish example project');
79
+
assert.equal(service.todos.length, 1);
80
+
assert.equal(service.todos[0].label, 'Finish example project');
0 commit comments