Skip to content

Commit

Permalink
Adapt mocha tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Apr 10, 2020
1 parent 4ec811d commit bcc5de1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ import moment from 'moment';
import ngMock from 'ng_mock';
import expect from '@kbn/expect';
import sinon from 'sinon';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { npStart } from 'ui/new_platform';
import { round } from 'lodash';
import { getAngularModule } from '../../get_inner_angular';
import { initTableVisLegacyModule } from '../../table_vis_legacy_module';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { getAngularModule } from '../../../../../../plugins/vis_type_table/public/get_inner_angular';

// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { initTableVisLegacyModule } from '../../../../../../plugins/vis_type_table/public/table_vis_legacy_module';
import { tabifiedData } from './tabified_data';
import { coreMock } from '../../../../../core/public/mocks';

describe('Table Vis - AggTable Directive', function() {
let $rootScope;
let $compile;
let settings;

const initLocalAngular = () => {
const tableVisModule = getAngularModule(
'kibana/table_vis',
coreMock.createStart(),
coreMock.createPluginInitializerContext()
);
const tableVisModule = getAngularModule('kibana/table_vis', npStart.core, { dev: {} });
initTableVisLegacyModule(tableVisModule);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,20 @@
import $ from 'jquery';
import ngMock from 'ng_mock';
import expect from '@kbn/expect';
import { getAngularModule } from '../../get_inner_angular';
import { initTableVisLegacyModule } from '../../table_vis_legacy_module';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { getAngularModule } from '../../../../../../plugins/vis_type_table/public/get_inner_angular';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { initTableVisLegacyModule } from '../../../../../../plugins/vis_type_table/public/table_vis_legacy_module';
import { tabifiedData } from './tabified_data';
import { coreMock } from '../../../../../core/public/mocks';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { npStart } from 'ui/new_platform';

describe('Table Vis - AggTableGroup Directive', function() {
let $rootScope;
let $compile;

const initLocalAngular = () => {
const tableVisModule = getAngularModule(
'kibana/table_vis',
coreMock.createStart(),
coreMock.createPluginInitializerContext()
);
const tableVisModule = getAngularModule('kibana/table_vis', npStart, { env: {} });
initTableVisLegacyModule(tableVisModule);
};

Expand Down

0 comments on commit bcc5de1

Please sign in to comment.