Skip to content

Commit

Permalink
Merge pull request #1221 from Accenture/dependabot/npm_and_yarn/devel…
Browse files Browse the repository at this point in the history
…op/eslint-plugin-mocha-10.3.0

Bump eslint-plugin-mocha from 10.2.0 to 10.3.0
  • Loading branch information
JoernBerkefeld committed Feb 23, 2024
2 parents 547b992 + f20f259 commit e63e197
Show file tree
Hide file tree
Showing 22 changed files with 179 additions and 5 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"eslint-config-prettier": "9.1.0",
"eslint-config-ssjs": "1.1.11",
"eslint-plugin-jsdoc": "48.2.0",
"eslint-plugin-mocha": "10.2.0",
"eslint-plugin-mocha": "10.3.0",
"eslint-plugin-prettier": "5.1.2",
"eslint-plugin-unicorn": "51.0.1",
"fast-xml-parser": "4.3.4",
Expand Down
9 changes: 9 additions & 0 deletions test/general.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,41 @@ describe('GENERAL', () => {
beforeEach(() => {
testUtils.mockSetup();
});

afterEach(() => {
testUtils.mockReset();
});

describe('init ================', () => {
it('should init a local project without downloading BUs');

it('should init a local project and download all BUs');
});

describe('join ================', () => {
it('should clone a project from git');
});

describe('upgrade ================', () => {
it('should upgrade a project to the latest version');
});

describe('reloadBUs ================', () => {
it('should load all BUs from the server and refresh the config');
});

describe('selectTypes ================', () => {
it('should change which types are selected for default retrieval');
});

describe('explainTypes ================', () => {
it('without options', () => {
handler.explainTypes();
assert.equal(process.exitCode, false, 'explainTypes should not have thrown an error');

return;
});

it('with --json set', () => {
handler.setOptions({ json: true });
const typeArr = handler.explainTypes();
Expand Down Expand Up @@ -76,6 +84,7 @@ describe('GENERAL', () => {
return;
});
});

describe('createDeltaPkg ================', () => {
it('should show diff to master branch');
// mcdev createDeltaPkg master # resolves to master..HEAD
Expand Down
3 changes: 3 additions & 0 deletions test/type.asset.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ describe('type: asset', () => {
beforeEach(() => {
testUtils.mockSetup();
});

afterEach(() => {
testUtils.mockReset();
});

describe('Retrieve ================', () => {
it('Should retrieve a asset & ensure non-ssjs code is not removed', async () => {
// WHEN
Expand Down Expand Up @@ -84,6 +86,7 @@ describe('type: asset', () => {
return;
});
});

describe('Delete ================', () => {
it('Should delete the item', async () => {
// WHEN
Expand Down
2 changes: 2 additions & 0 deletions test/type.attributeGroup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ describe('type: attributeGroup', () => {
beforeEach(() => {
testUtils.mockSetup();
});

afterEach(() => {
testUtils.mockReset();
});

describe('Retrieve ================', () => {
it('Should retrieve a attributeGroup', async () => {
// WHEN
Expand Down
2 changes: 2 additions & 0 deletions test/type.attributeSet.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ describe('type: attributeSet', () => {
beforeEach(() => {
testUtils.mockSetup();
});

afterEach(() => {
testUtils.mockReset();
});

describe('Retrieve ================', () => {
it('Should retrieve a attributeSet', async () => {
// WHEN
Expand Down
30 changes: 30 additions & 0 deletions test/type.automation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ describe('type: automation', () => {
beforeEach(() => {
testUtils.mockSetup();
});

afterEach(() => {
testUtils.mockReset();
});

describe('Retrieve ================', () => {
it('Should retrieve a automation', async () => {
// WHEN
Expand Down Expand Up @@ -54,10 +56,12 @@ describe('type: automation', () => {
return;
});
});

describe('Deploy ================', () => {
beforeEach(() => {
testUtils.mockSetup(true);
});

it('Should create & update a automation', async () => {
// WHEN
const deployResult = await handler.deploy(
Expand Down Expand Up @@ -127,6 +131,7 @@ describe('type: automation', () => {
);
return;
});

it('Should update & schedule an automation with --schedule option', async () => {
// WHEN
handler.setOptions({ schedule: true });
Expand Down Expand Up @@ -196,6 +201,7 @@ describe('type: automation', () => {
);
return;
});

it('Should update & runOnce an automation with --execute option', async () => {
// WHEN
handler.setOptions({ execute: true });
Expand Down Expand Up @@ -265,10 +271,12 @@ describe('type: automation', () => {
return;
});
});

describe('FixKeys ================', () => {
beforeEach(() => {
testUtils.mockSetup(true);
});

it('Should run fixKeys but not find fixable keys and hence stop', async () => {
// WHEN
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false } });
Expand Down Expand Up @@ -299,6 +307,7 @@ describe('type: automation', () => {
);
return;
});

it('Should fixKeys by key w/o re-retrieving, auto-schedule', async () => {
// WHEN
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false } });
Expand Down Expand Up @@ -343,6 +352,7 @@ describe('type: automation', () => {
);
return;
});

it('Should fixKeys by key w/o re-retrieving, auto-schedule and then --execute', async () => {
// WHEN
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false }, execute: true });
Expand Down Expand Up @@ -387,6 +397,7 @@ describe('type: automation', () => {
);
return;
});

it('Should fixKeys by key w/o re-retrieving, auto-schedule and then --schedule', async () => {
// WHEN
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false }, schedule: true });
Expand Down Expand Up @@ -431,6 +442,7 @@ describe('type: automation', () => {
);
return;
});

it('Should fixKeys by key w/o re-retrieving, deploy paused', async () => {
// WHEN
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false } });
Expand Down Expand Up @@ -471,6 +483,7 @@ describe('type: automation', () => {
);
return;
});

it('Should fixKeys by key w/o re-retrieving, deploy paused and then --execute', async () => {
// WHEN
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false }, execute: true });
Expand Down Expand Up @@ -512,6 +525,7 @@ describe('type: automation', () => {
);
return;
});

it('Should fixKeys by key w/o re-retrieving, deploy paused and then --schedule', async () => {
// WHEN
handler.setOptions({ skipInteraction: { fixKeysReretrieve: false }, schedule: true });
Expand Down Expand Up @@ -554,6 +568,7 @@ describe('type: automation', () => {
return;
});
});

describe('Templating ================', () => {
it('Should create a automation template via retrieveAsTemplate and build it', async () => {
// GIVEN there is a template
Expand Down Expand Up @@ -604,6 +619,7 @@ describe('type: automation', () => {
);
return;
});

it('Should create a automation template via buildTemplate and build it', async () => {
// download first before we test buildTemplate
await handler.retrieve('testInstance/testBU', ['automation']);
Expand Down Expand Up @@ -652,6 +668,7 @@ describe('type: automation', () => {
return;
});
});

describe('Delete ================', () => {
it('Should delete the item', async () => {
// WHEN
Expand All @@ -667,6 +684,7 @@ describe('type: automation', () => {
return;
});
});

describe('CI/CD ================', () => {
it('Should return a list of files based on their type and key', async () => {
// WHEN
Expand Down Expand Up @@ -694,6 +712,7 @@ describe('type: automation', () => {
return;
});
});

describe('Schedule ================', () => {
it('Should schedule an automation by key', async () => {
const executedKeys = await handler.schedule('testInstance/testBU', 'automation', [
Expand All @@ -712,6 +731,7 @@ describe('type: automation', () => {
);
return;
});

it('Should schedule an automation selected via --like', async () => {
handler.setOptions({ like: { key: 'testExist%automation' } });
const executedKeys = await handler.schedule('testInstance/testBU', 'automation');
Expand All @@ -728,6 +748,7 @@ describe('type: automation', () => {
);
return;
});

it('Should not schedule executing an automation because key and --like was specified', async () => {
handler.setOptions({ like: { key: 'testExisting%' } });
const executedKeys = await handler.schedule('testInstance/testBU', 'automation', [
Expand All @@ -742,6 +763,7 @@ describe('type: automation', () => {
return;
});
});

describe('Execute ================', () => {
it('Should execute --schedule an automation by key', async () => {
handler.setOptions({ schedule: true });
Expand All @@ -761,6 +783,7 @@ describe('type: automation', () => {
);
return;
});

it('Should execute --schedule an automation selected via --like', async () => {
handler.setOptions({ like: { key: 'testExist%automation' }, schedule: true });
const executedKeys = await handler.execute('testInstance/testBU', 'automation');
Expand All @@ -777,6 +800,7 @@ describe('type: automation', () => {
);
return;
});

it('Should not execute --schedule executing an automation because key and --like was specified', async () => {
handler.setOptions({ like: { key: 'testExisting%' }, schedule: true });
const executedKeys = await handler.execute('testInstance/testBU', 'automation', [
Expand All @@ -790,6 +814,7 @@ describe('type: automation', () => {
);
return;
});

it('Should runOnce an automation by key', async () => {
const executedKeys = await handler.execute('testInstance/testBU', 'automation', [
'testExisting_automation',
Expand All @@ -807,6 +832,7 @@ describe('type: automation', () => {
);
return;
});

it('Should runOnce an automation selected via --like', async () => {
handler.setOptions({ like: { key: 'testExist%automation' } });
const executedKeys = await handler.execute('testInstance/testBU', 'automation');
Expand All @@ -824,6 +850,7 @@ describe('type: automation', () => {

return;
});

it('Should not runOnce executing an automation because key and --like was specified', async () => {
handler.setOptions({ like: { key: 'testExisting%' } });
const executedKeys = await handler.execute('testInstance/testBU', 'automation', [
Expand All @@ -839,6 +866,7 @@ describe('type: automation', () => {
return;
});
});

describe('Pause ================', () => {
it('Should pause a automation by key', async () => {
const pausedKeys = await handler.pause('testInstance/testBU', 'automation', [
Expand All @@ -857,6 +885,7 @@ describe('type: automation', () => {
);
return;
});

it('Should pause a automation selected via --like', async () => {
handler.setOptions({ like: { key: 'testExisting_a%n_pause' } });
const pausedKeys = await handler.pause('testInstance/testBU', 'automation');
Expand All @@ -873,6 +902,7 @@ describe('type: automation', () => {
);
return;
});

it('Should not pause automation because key and --like was specified', async () => {
handler.setOptions({ like: { key: 'testExisting_a%n_pause' } });
const pausedKeys = await handler.pause('testInstance/testBU', 'automation', [
Expand Down
Loading

0 comments on commit e63e197

Please sign in to comment.