Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mati365 committed Jan 7, 2025
1 parent dbc74cb commit 9d44992
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/ckeditor5-core/src/editor/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ export default abstract class Editor extends /* #__PURE__ */ ObservableMixin() {

console.warn(
`⚠️ You are using a ${ licenseType } license of CKEditor 5` +
`${ licenseKey === 'trial' ? ' which is for evaluation purposes only' : '' }. ` +
`${ licenseType === 'trial' ? ' which is for evaluation purposes only' : '' }. ` +
'For production usage, please obtain a production license at https://portal.ckeditor.com/.'
);
}
Expand Down
19 changes: 6 additions & 13 deletions packages/ckeditor5-core/tests/editor/licensecheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,19 +403,12 @@ describe( 'Editor - license check', () => {
// Verify console.warn call with the warning message
sinon.assert.calledOnce( consoleWarnStub );

if ( licenseType === 'evaluation' ) {
sinon.assert.calledWith(
consoleWarnStub,
`⚠️ You are using a ${ licenseType } license of CKEditor 5. ` +
'For production usage, please obtain a production license at https://portal.ckeditor.com/.'
);
} else {
sinon.assert.calledWith(
consoleWarnStub,
`⚠️ You are using a ${ licenseType } license of CKEditor 5. ` +
'For production usage, please obtain a production license at https://portal.ckeditor.com/.'
);
}
sinon.assert.calledWith(
consoleWarnStub,
`⚠️ You are using a ${ licenseType } license of CKEditor 5` +
`${ licenseType === 'trial' ? ' which is for evaluation purposes only' : '' }. ` +
'For production usage, please obtain a production license at https://portal.ckeditor.com/.'
);

dateNow.restore();
} );
Expand Down

0 comments on commit 9d44992

Please sign in to comment.