Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ exports.Team = class {

async regroup(options) {

await this.work;
try {
await this.work;
}
catch {}

this._init(options);
}
Expand Down
11 changes: 11 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,17 @@ describe('Team', () => {
await expect(team.work).to.reject();
expect(Teamwork.Team._notes(team)).to.be.null();
});

it('regroup works after team error', async () => {

const team = new Teamwork.Team({ meetings: 2, strict: true });
team.attend(new Error('failed'));

const regroup = team.regroup();

await expect(team.work).to.reject('failed');
await expect(regroup).to.not.reject();
});
});

describe('Events', () => {
Expand Down
Loading