Skip to content

Commit

Permalink
Fix tests that have the same title (mocha/no-identical-title)
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Sep 29, 2018
1 parent a9f3a67 commit f1bd595
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 44 deletions.
17 changes: 0 additions & 17 deletions test/api/child.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,6 @@ describe('#child', function() {
childExpect('yaddafoobar', 'to foobar');
});

it('should prefer a style defined in the child, even if it was added before an identically named one in the parent', function() {
childExpect.addStyle('yadda', function() {
this.text('yaddagood');
});
parentExpect.addStyle('yadda', function() {
this.text('yaddabad');
});
expect(
childExpect
.createOutput('text')
.yadda()
.toString(),
'to equal',
'yaddagood'
);
});

it('should allow installing an identically named plugin', function() {
parentExpect.use({
name: 'foo',
Expand Down
26 changes: 14 additions & 12 deletions test/assertions/to-satisfy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,20 @@ describe('to satisfy assertion', function() {
);
});

it('should fail', function() {
expect(
function() {
expect({ foo: {} }, 'to satisfy', { foo: [] });
},
'to throw',
'expected { foo: {} } to satisfy { foo: [] }\n' +
'\n' +
'{\n' +
' foo: {} // should satisfy []\n' +
'}'
);
describe('when the array is nested inside an object', function() {
it('should fail', function() {
expect(
function() {
expect({ foo: {} }, 'to satisfy', { foo: [] });
},
'to throw',
'expected { foo: {} } to satisfy { foo: [] }\n' +
'\n' +
'{\n' +
' foo: {} // should satisfy []\n' +
'}'
);
});
});
});

Expand Down
15 changes: 0 additions & 15 deletions test/assertions/when-fulfilled.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,6 @@ describe('when fulfilled adverbial assertion', function() {
);
});

it('should fail when the promise is rejected with a value of undefined', function() {
return expect(
expect(
new Promise(function(resolve, reject) {
setTimeout(reject, 0);
}),
'when fulfilled',
'to be truthy'
),
'to be rejected with',
'expected Promise when fulfilled to be truthy\n' +
' Promise unexpectedly rejected'
);
});

it('should fail when the next assertion fails', function() {
return expect(
expect(
Expand Down

0 comments on commit f1bd595

Please sign in to comment.