- Linting (ESLint): Stricter rules (or switch to warning)
- Breaking internal API change: `updateGripCursor` moved to be class method of Selector rather than instance method - Breaking internal API change: `subpathIsClosed` moved to be class method of `Path` rather than instance method - Refactoring: Reuse utilities base64 encoder for SVG icons plugin - Docs (JSDoc): Fix return of the `mouseUp` (can also be an object) and `mouseDown` (may also be a boolean) of `pathActions`; other JSDoc additions/improvements
This commit is contained in:
@@ -8,6 +8,10 @@ QUnit.log((details) => {
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Tear down tests, resetting custom menus.
|
||||
* @returns {undefined}
|
||||
*/
|
||||
function tearDown () {
|
||||
contextmenu.resetCustomMenus();
|
||||
}
|
||||
@@ -39,7 +43,7 @@ QUnit.test('Test svgedit.contextmenu does not add invalid menu item', function (
|
||||
QUnit.test('Test svgedit.contextmenu adds valid menu item', function (assert) {
|
||||
assert.expect(2);
|
||||
|
||||
const validItem = {id: 'valid', label: 'anicelabel', action () { alert('testing'); }};
|
||||
const validItem = {id: 'valid', label: 'anicelabel', action () { console.log('testing'); }};
|
||||
contextmenu.add(validItem);
|
||||
|
||||
assert.ok(contextmenu.hasCustomHandler('valid'), 'Valid menu item is added.');
|
||||
@@ -50,8 +54,8 @@ QUnit.test('Test svgedit.contextmenu adds valid menu item', function (assert) {
|
||||
QUnit.test('Test svgedit.contextmenu rejects valid duplicate menu item id', function (assert) {
|
||||
assert.expect(1);
|
||||
|
||||
const validItem1 = {id: 'valid', label: 'anicelabel', action () { alert('testing'); }};
|
||||
const validItem2 = {id: 'valid', label: 'anicelabel', action () { alert('testingtwice'); }};
|
||||
const validItem1 = {id: 'valid', label: 'anicelabel', action () { console.log('testing'); }};
|
||||
const validItem2 = {id: 'valid', label: 'anicelabel', action () { console.log('testingtwice'); }};
|
||||
contextmenu.add(validItem1);
|
||||
contextmenu.add(validItem2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user