Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import expect from '@kbn/expect';
import sinon from 'sinon';
import { CancellationToken } from '../../../../../common/cancellation_token';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if moving this to TS would help with these kinds of issues?

// FAILING: https://github.com/elastic/kibana/issues/51373
describe.skip('CancellationToken', function() {
describe('CancellationToken', function() {
let cancellationToken;
beforeEach(function() {
cancellationToken = new CancellationToken();
Expand Down Expand Up @@ -65,12 +64,12 @@ describe.skip('CancellationToken', function() {

describe('isCancelled', function() {
it('should default to false', function() {
expect(cancellationToken.isCancelled).to.be(false);
expect(cancellationToken.isCancelled()).to.be(false);
});

it('should switch to true after call to cancel', function() {
cancellationToken.cancel();
expect(cancellationToken.isCancelled).to.be(true);
expect(cancellationToken.isCancelled()).to.be(true);
});
});
});