chore(prettier): full repo linting and code reformatting once and for all (#3627)
This commit is contained in:
1 parent
01500a2d4c
commit
9045ddaedc
656 files changed
+21737
-20628
No files matched your search
@@ -94,10 +94,7 @@ describe('CommandsManager', () => {
|
||||
|
||||
describe('getCommand()', () => {
|
||||
it('returns undefined if context does not exist', () => {
|
||||
const result = commandsManager.getCommand(
|
||||
'TestCommand',
|
||||
'NonExistentContext'
|
||||
);
|
||||
const result = commandsManager.getCommand('TestCommand', 'NonExistentContext');
|
||||
|
||||
expect(result).toBe(undefined);
|
||||
});
|
||||
@@ -131,9 +128,7 @@ describe('CommandsManager', () => {
|
||||
|
||||
describe('runCommand()', () => {
|
||||
it('Logs a warning if commandName not found in context', () => {
|
||||
const result = commandsManager.runCommand(
|
||||
'CommandThatDoesNotExistInAnyContext'
|
||||
);
|
||||
const result = commandsManager.runCommand('CommandThatDoesNotExistInAnyContext');
|
||||
|
||||
expect(result).toBe(undefined);
|
||||
expect(log.warn.mock.calls[0][0]).toEqual(
|
||||
@@ -149,16 +144,8 @@ describe('CommandsManager', () => {
|
||||
};
|
||||
|
||||
commandsManager.createContext(contextName);
|
||||
commandsManager.registerCommand(
|
||||
contextName,
|
||||
'TestCommand',
|
||||
commandWithNoCommmandFn
|
||||
);
|
||||
const result = commandsManager.runCommand(
|
||||
'TestCommand',
|
||||
null,
|
||||
contextName
|
||||
);
|
||||
commandsManager.registerCommand(contextName, 'TestCommand', commandWithNoCommmandFn);
|
||||
const result = commandsManager.runCommand('TestCommand', null, contextName);
|
||||
|
||||
expect(result).toBe(undefined);
|
||||
expect(log.warn.mock.calls[0][0]).toEqual(
|
||||
@@ -192,9 +179,7 @@ describe('CommandsManager', () => {
|
||||
commandsManager.runCommand('TestCommand', runCommandOptions, 'VIEWER');
|
||||
|
||||
expect(command.commandFn.mock.calls.length).toBe(1);
|
||||
expect(command.commandFn.mock.calls[0][0].test).toEqual(
|
||||
runCommandOptions.test
|
||||
);
|
||||
expect(command.commandFn.mock.calls[0][0].test).toEqual(runCommandOptions.test);
|
||||
});
|
||||
|
||||
it('Returns the result of commandFn', () => {
|
||||
|
||||
Reference in new issue
Block a user