Пример #1
0
 it('calls the execute function', () => {
   queryToolActions.explainAnalyze(sqlEditorController);
   const explainObject = {
     format: 'json',
     analyze: true,
     verbose: true,
     costs: true,
     buffers: true,
     timing: true,
     summary: false,
   };
   expect(sqlEditorController.execute).toHaveBeenCalledWith(explainObject);
 });
Пример #2
0
      it('calls the execute function', () => {
        queryToolActions.explainAnalyze(sqlEditorController);

        // let explainAnalyzeQuery = 'EXPLAIN (FORMAT JSON, ANALYZE ON, VERBOSE OFF, COSTS OFF, BUFFERS OFF, TIMING OFF) ';
        const explainObject = {
          format: 'json',
          analyze: true,
          verbose: false,
          costs: false,
          buffers: false,
          timing: false,
          summary: false,
        };

        expect(sqlEditorController.execute).toHaveBeenCalledWith(explainObject);
      });