Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-fenster committed Mar 10, 2021
1 parent a945839 commit 080699f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 29 deletions.
5 changes: 1 addition & 4 deletions lib/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ exports.it.only = function(...args) {
return (currentContext.it || currentContext.test).only.apply(this, args);
};
exports.it.skip = function(...args) {
return (
currentContext.xit ||
(currentContext.test && currentContext.test.skip)
).apply(this, args);
return (currentContext.it || currentContext.test).skip.apply(this, args);
};
exports.xdescribe = exports.describe.skip;
exports.xit = exports.it.skip;
Expand Down
4 changes: 2 additions & 2 deletions test/integration/fixtures/common-js-require.fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ suite('root suite', () => {
describe.only('describe only', () => {
it('it', () => {
console.log('running it');
});
}).timeout(1000);
xit('it', () => {
console.log('running xit');
});
it.only('it.only', () => {
console.log('running it.only');
});
}).retries(2);
it.skip('it.skip', () => {
console.log('running it.skip');
});
Expand Down
9 changes: 0 additions & 9 deletions test/integration/fixtures/timeout-override-it.fixture.js

This file was deleted.

14 changes: 0 additions & 14 deletions test/integration/timeout.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,4 @@ describe('this.timeout()', function() {
done();
});
});

it('should allow using it().timeout()', function(done) {
run('timeout-override-it.fixture.js', args, function(err, res) {
if (err) {
done(err);
return;
}
assert.strictEqual(res.stats.pending, 0);
assert.strictEqual(res.stats.passes, 1);
assert.strictEqual(res.stats.failures, 0);
assert.strictEqual(res.code, 0);
done();
});
});
});

0 comments on commit 080699f

Please sign in to comment.