Skip to content

Commit

Permalink
chore(context-pad): improve getPad deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed May 3, 2024
1 parent 3006151 commit 698426f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/features/context-pad/ContextPad.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,7 @@ ContextPad.prototype._createHtml = function(target) {
* @return { { html: HTMLElement } }
*/
ContextPad.prototype.getPad = function(target) {
console.warn(new Error(
'getPad is deprecated and will be removed in future library versions'
));
console.warn(new Error('ContextPad#getPad is deprecated and will be removed in future library versions, cf. https://github.com/bpmn-io/diagram-js/pull/888'));

let html;

Expand Down
2 changes: 1 addition & 1 deletion test/spec/features/context-pad/ContextPadSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ describe('features/context-pad', function() {

expect(warnSpy).to.have.been.calledOnce;
expect(warnSpy.getCall(0).args[ 0 ]).to.be.instanceOf(Error);
expect(warnSpy.getCall(0).args[ 0 ].message).to.equal('getPad is deprecated and will be removed in future library versions');
expect(warnSpy.getCall(0).args[ 0 ].message).to.match(/is deprecated/);
}));

});
Expand Down

0 comments on commit 698426f

Please sign in to comment.