Skip to content

Instantly share code, notes, and snippets.

@scott-w
Created October 14, 2017 14:34
Show Gist options
  • Save scott-w/f3d92b8f660df6c4d65efaf71aa6562c to your computer and use it in GitHub Desktop.
Save scott-w/f3d92b8f660df6c4d65efaf71aa6562c to your computer and use it in GitHub Desktop.
New Failing Tests
import { assert } from 'chai';
import { MyModel } from 'model';
describe('MyModel', function() {
let model = null
afterEach(function() {
model = null;
});
describe('initalized empty', function() {
beforeEach(function() {
model = new MyModel();
});
it('defaults its counter to 0', function() {
assert.equal(model.get('counter'), 0);
});
describe('calling increment()', function() {
it('increments by 1', function() {
model.increment();
assert.equal(model.get('counter'), 1);
});
it('returns the incremented value', function() {
assert.equal(model.increment(), 1);
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment