Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core: fix pivotGrid async mocks
Browse files Browse the repository at this point in the history
ivanblinov2k17 committed Oct 16, 2024
1 parent c2ce666 commit 96e66d0
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import Class from '@js/core/class';
import { EventsStrategy } from '@js/core/events_strategy';
// @ts-expect-error
import { executeAsync } from '@js/core/utils/common';
import { Deferred, when } from '@js/core/utils/deferred';
import { extend } from '@js/core/utils/extend';
import { each } from '@js/core/utils/iterator';
@@ -24,6 +22,7 @@ import {
import { errors } from '@js/data/errors';
// @ts-expect-error
import { throttleChanges } from '@js/data/utils';
import commonUtils from '@ts/core/utils/m_common';

export const DataSource = Class.inherit({
ctor(options) {
@@ -422,7 +421,7 @@ export const DataSource = Class.inherit({

this._loadQueue.add(() => {
if (typeof loadOperation.delay === 'number') {
this._delayedLoadTask = executeAsync(loadTask, loadOperation.delay);
this._delayedLoadTask = commonUtils.executeAsync(loadTask, loadOperation.delay);
} else {
loadTask();
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @ts-expect-error
import { executeAsync } from '@js/core/utils/common';
import { extend } from '@js/core/utils/extend';
import { isDefined } from '@js/core/utils/type';
import commonUtils from '@ts/core/utils/m_common';

import gridCoreUtils from '../m_utils';

@@ -45,7 +44,7 @@ export const calculateOperationTypes = function (loadOptions, lastLoadOptions, i

export const executeTask = function (action, timeout) {
if (isDefined(timeout)) {
executeAsync(action, timeout);
commonUtils.executeAsync(action, timeout);
} else {
action();
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import Class from '@js/core/class';
import { EventsStrategy } from '@js/core/events_strategy';
import { normalizeIndexes } from '@js/core/utils/array';
// @ts-expect-error
import { executeAsync } from '@js/core/utils/common';
import { Deferred, when } from '@js/core/utils/deferred';
import { extend } from '@js/core/utils/extend';
import { titleize } from '@js/core/utils/inflector';
@@ -13,6 +11,7 @@ import {
} from '@js/core/utils/type';
import Store from '@js/data/abstract_store';
import { normalizeDataSourceOptions } from '@js/data/data_source/utils';
import commonUtils from '@ts/core/utils/m_common';

import { LocalStore } from '../local_store/m_local_store';
import {
@@ -772,7 +771,7 @@ const PivotGridDataSource = Class.inherit((function () {
}
}
if (that.store()) {
that._delayedLoadTask = executeAsync(loadTask);
that._delayedLoadTask = commonUtils.executeAsync(loadTask);
} else {
loadTask();
}

0 comments on commit 96e66d0

Please sign in to comment.