Add descriptions to beforeEach()s

These get printed out if something errors in a beforeEach(), making it
easier to find the error. They also help to make the code easier to
read.
parent fc3f7e0f
...@@ -18,7 +18,7 @@ describe('sidebar.components.annotation-header', function () { ...@@ -18,7 +18,7 @@ describe('sidebar.components.annotation-header', function () {
var fakeSettings = { usernameUrl: 'http://www.example.org/' }; var fakeSettings = { usernameUrl: 'http://www.example.org/' };
var fakeServiceUrl; var fakeServiceUrl;
before(function () { beforeEach('Import and register the annotationHeader component', function () {
var annotationHeader = proxyquire('../annotation-header', { var annotationHeader = proxyquire('../annotation-header', {
'../annotation-metadata': { '../annotation-metadata': {
domainAndTitle: function (ann) { // eslint-disable-line no-unused-vars domainAndTitle: function (ann) { // eslint-disable-line no-unused-vars
...@@ -35,7 +35,7 @@ describe('sidebar.components.annotation-header', function () { ...@@ -35,7 +35,7 @@ describe('sidebar.components.annotation-header', function () {
.component('annotationHeader', annotationHeader); .component('annotationHeader', annotationHeader);
}); });
beforeEach(function () { beforeEach('Initialize and register fake AngularJS dependencies', function () {
fakeFeatures = { fakeFeatures = {
flagEnabled: sinon.stub().returns(false), flagEnabled: sinon.stub().returns(false),
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment