Skip to content

Commit

Permalink
Rename files
Browse files Browse the repository at this point in the history
  • Loading branch information
rmi22186 committed Nov 29, 2023
1 parent 652ca20 commit d83d7e7
Show file tree
Hide file tree
Showing 30 changed files with 54 additions and 56 deletions.
2 changes: 1 addition & 1 deletion rollup.test.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const extensions = ['.js', '.ts'];

const builds = {
main: {
input: 'test/src/_index.ts',
input: 'test/src/__test.index.ts',
output: {
file: 'test/test-bundle.js',
format: 'iife',
Expand Down
2 changes: 1 addition & 1 deletion test/jest/sideloadedKit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IMPSideloadedKitConstructor } from "../../src/sideloadedKit";
import { EventTypeEnum, IdentityType } from "../../src/types.interfaces";
import { UnregisteredKit } from '../../src/forwarders.interfaces';
import { IKitFilterSettings } from '../../src/configAPIClient';
import { mParticle } from "../src/config";
import { mParticle } from "../src/config/constants";

const mockKitInstance: UnregisteredKit = {
register: function() {}
Expand Down
2 changes: 1 addition & 1 deletion test/src/_index.ts → test/src/__test.index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import set up logic
import './_test.setup';
import './config/setup';

// Import each test module
import './tests-core-sdk';
Expand Down
2 changes: 1 addition & 1 deletion test/src/config.ts → test/src/config/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SDKInitConfig } from "../../src/sdkRuntimeModels";
import { SDKInitConfig } from "../../../src/sdkRuntimeModels";

export const urls = {
events: 'https://jssdks.mparticle.com/v3/JS/test_key/events',
Expand Down
4 changes: 2 additions & 2 deletions test/src/_test.setup.ts → test/src/config/setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MPConfig, workspaceToken } from './config';
import { MParticleWebSDK } from '../../src/sdkRuntimeModels';
import { MPConfig, workspaceToken } from './constants';
import { MParticleWebSDK } from '../../../src/sdkRuntimeModels';

declare global {
interface Window {
Expand Down
4 changes: 2 additions & 2 deletions test/src/utils.js → test/src/config/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Utils from '../../src/utils';
import * as Utils from '../../../src/utils';
import {
apiKey,
testMPID,
Expand All @@ -8,7 +8,7 @@ import {
workspaceToken,
workspaceCookieName,
das,
} from './config';
} from './constants';

var pluses = /\+/g,
getLocalStorageProducts = function getLocalStorageProducts() {
Expand Down
2 changes: 1 addition & 1 deletion test/src/tests-apiClient.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Types from '../../src/types';
import Constants from '../../src/constants';
import { apiKey, MPConfig } from './config';
import { apiKey, MPConfig } from './config/constants';
import { MParticleWebSDK } from '../../src/sdkRuntimeModels';
import { expect } from 'chai';

Expand Down
6 changes: 3 additions & 3 deletions test/src/tests-batchUploader.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import sinon from 'sinon';
import { urls } from './config';
import { apiKey, MPConfig, testMPID } from './config';
import { urls } from './config/constants';
import { apiKey, MPConfig, testMPID } from './config/constants';
import {
BaseEvent,
MParticleWebSDK,
SDKEvent,
SDKProductActionType,
} from '../../src/sdkRuntimeModels';
import { Batch, CustomEventData } from '@mparticle/event-models';
import Utils from './utils';
import Utils from './config/utils';
import { BatchUploader } from '../../src/batchUploader';
import { expect } from 'chai';
import _BatchValidator from '../../src/mockBatchCreator';
Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-beaconUpload.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import sinon from 'sinon';
import fetchMock from 'fetch-mock/esm/client';
import { expect } from 'chai';
import { urls } from './config';
import { apiKey, MPConfig, testMPID } from './config';
import { urls } from './config/constants';
import { apiKey, MPConfig, testMPID } from './config/constants';
import { MParticleWebSDK } from '../../src/sdkRuntimeModels';
import { event0 } from '../fixtures/events';
import { batch1, batch2, batch3 } from '../fixtures/batches';
Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-config-api-client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sinon from 'sinon';
import { urls } from './config';
import { apiKey, MPConfig } from './config';
import { urls } from './config/constants';
import { apiKey, MPConfig } from './config/constants';
import { expect } from 'chai';
import ConfigAPIClient, {
IConfigAPIClient,
Expand Down
6 changes: 3 additions & 3 deletions test/src/tests-consent.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Utils from './utils';
import Utils from './config/utils';
import sinon from 'sinon';
import fetchMock from 'fetch-mock/esm/client';
import { urls } from './config';
import { apiKey, MPConfig, testMPID } from './config';
import { urls } from './config/constants';
import { apiKey, MPConfig, testMPID } from './config/constants';
import { MParticleWebSDK } from '../../src/sdkRuntimeModels';
import { expect } from 'chai';
import { GDPRConsentState, PrivacyConsentState } from '@mparticle/web-sdk';
Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-cookie-syncing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Utils from './utils';
import Utils from './config/utils';
import sinon from 'sinon';
import fetchMock from 'fetch-mock/esm/client';
import { urls, testMPID, MPConfig, v4LSKey, apiKey } from './config';
import { urls, testMPID, MPConfig, v4LSKey, apiKey } from './config/constants';

const { setLocalStorage, MockForwarder, getLocalStorage } = Utils;

Expand Down
5 changes: 2 additions & 3 deletions test/src/tests-core-sdk.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import Utils from './utils';
import Utils from './config/utils';
import Store from '../../src/store';
import Constants from '../../src/constants';
import sinon from 'sinon';
import fetchMock from 'fetch-mock/esm/client';
import { urls } from './config';
import { apiKey, das, MPConfig, testMPID, workspaceCookieName } from './config';
import { urls, apiKey, das, MPConfig, testMPID, workspaceCookieName } from './config/constants';

const DefaultConfig = Constants.DefaultConfig,
setLocalStorage = Utils.setLocalStorage,
Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-eCommerce.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Utils from './utils';
import Utils from './config/utils';
import sinon from 'sinon';
import fetchMock from 'fetch-mock/esm/client';
import { urls, apiKey, workspaceToken, MPConfig, testMPID, ProductActionType, PromotionActionType } from './config';
import { urls, apiKey, workspaceToken, MPConfig, testMPID, ProductActionType, PromotionActionType } from './config/constants';

const getLocalStorageProducts = Utils.getLocalStorageProducts,
forwarderDefaultConfiguration = Utils.forwarderDefaultConfiguration,
Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-event-logging.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Utils from './utils';
import Utils from './config/utils';
import sinon from 'sinon';
import fetchMock from 'fetch-mock/esm/client';
import { urls, apiKey,
testMPID,
MPConfig,
MessageType } from './config';
MessageType } from './config/constants';

const getIdentityEvent = Utils.getIdentityEvent,
findEventFromRequest = Utils.findEventFromRequest,
Expand Down
5 changes: 2 additions & 3 deletions test/src/tests-forwarders.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import Utils from './utils';
import Utils from './config/utils';
import sinon from 'sinon';
import fetchMock from 'fetch-mock/esm/client';

import { urls } from './config';
import { apiKey, MPConfig, testMPID, MessageType } from './config';
import { urls, apiKey, MPConfig, testMPID, MessageType } from './config/constants';
import { expect } from 'chai';

const findEventFromRequest = Utils.findEventFromRequest,
Expand Down
2 changes: 1 addition & 1 deletion test/src/tests-helpers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { apiKey } from './config';
import { apiKey } from './config/constants';
import sinon from 'sinon';

describe('helpers', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-identities-attributes.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Utils from './utils';
import Utils from './config/utils';
import sinon from 'sinon';
import fetchMock from 'fetch-mock/esm/client';
import { urls, apiKey,
testMPID,
MPConfig } from './config';
MPConfig } from './config/constants';

const findEventFromRequest = Utils.findEventFromRequest,
findBatch = Utils.findBatch,
Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-identity.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Constants from '../../src/constants';
import Utils from './utils';
import Utils from './config/utils';
import sinon from 'sinon';
import fetchMock from 'fetch-mock/esm/client';
import { urls, apiKey,
testMPID,
MPConfig,
workspaceCookieName } from './config';
workspaceCookieName } from './config/constants';

const getLocalStorage = Utils.getLocalStorage,
setLocalStorage = Utils.setLocalStorage,
Expand Down
6 changes: 3 additions & 3 deletions test/src/tests-kit-blocking.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import sinon from 'sinon';
import { urls } from './config';
import { apiKey, MPConfig, testMPID } from './config';
import { urls } from './config/constants';
import { apiKey, MPConfig, testMPID } from './config/constants';
import { MParticleWebSDK, SDKEvent, SDKProductActionType, DataPlanResult, KitBlockerDataPlan } from '../../src/sdkRuntimeModels';
import * as dataPlan from './dataPlan.json';
import Utils from './utils';
import Utils from './config/utils';
import KitBlocker from '../../src/kitBlocking';
import Types from '../../src/types';
import { DataPlanVersion } from '@mparticle/data-planning-models';
Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-mParticleUser.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Utils from './utils';
import Utils from './config/utils';
import sinon from 'sinon';
import { urls, apiKey, MPConfig } from './config';
import { urls, apiKey, MPConfig } from './config/constants';

const forwarderDefaultConfiguration = Utils.forwarderDefaultConfiguration,
MockForwarder = Utils.MockForwarder;
Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-mparticle-instance-manager.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sinon from 'sinon';
import fetchMock from 'fetch-mock/esm/client';
import { urls, MPConfig } from './config';
import Utils from './utils';
import { urls, MPConfig } from './config/constants';
import Utils from './config/utils';
const findEventFromRequest = Utils.findEventFromRequest;
let mockServer;

Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-native-sdk.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Utils from './utils';
import { apiKey, MPConfig } from './config';
import Utils from './config/utils';
import { apiKey, MPConfig } from './config/constants';
import Constants from '../../src/constants';

const getLocalStorage = Utils.getLocalStorage,
Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-persistence.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Utils from './utils';
import Utils from './config/utils';
import sinon from 'sinon';
import fetchMock from 'fetch-mock/esm/client';

Expand All @@ -12,7 +12,7 @@ import {
LocalStorageProductsV4WithWorkSpaceName,
workspaceCookieName,
v4LSKey,
} from './config';
} from './config/constants';
import { expect } from 'chai';
import {
IGlobalStoreV2MinifiedKeys,
Expand Down
2 changes: 1 addition & 1 deletion test/src/tests-queue-public-methods.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sinon from 'sinon';
import { apiKey, MPConfig, testMPID, urls } from './config';
import { apiKey, MPConfig, testMPID, urls } from './config/constants';
import { SDKProductActionType } from '../../src/sdkRuntimeModels';

describe('Queue Public Methods', function () {
Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-runtimeToBatchEventsDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { expect } from 'chai';
import Types from '../../src/types';
import { SDKEvent, MParticleWebSDK } from '../../src/sdkRuntimeModels';
import * as EventsApi from '@mparticle/event-models';
import Utils from './utils';
import { urls, MPConfig, apiKey } from './config';
import Utils from './config/utils';
import { urls, MPConfig, apiKey } from './config/constants';

declare global {
interface Window {
Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-self-hosting-specific.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Utils from './utils';
import Utils from './config/utils';
import sinon from 'sinon';
import fetchMock from 'fetch-mock/esm/client';
import { urls, apiKey, MPConfig } from './config';
import { urls, apiKey, MPConfig } from './config/constants';

const { findEventFromRequest, findBatch } = Utils;

Expand Down
2 changes: 1 addition & 1 deletion test/src/tests-serverModel.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Types from '../../src/types';
import sinon from 'sinon';
import { urls, testMPID, apiKey } from './config';
import { urls, testMPID, apiKey } from './config/constants';
import { expect } from 'chai';
import { IUploadObject } from '../../src/serverModel';
import { AllUserAttributes, IdentityApiData } from '@mparticle/web-sdk';
Expand Down
2 changes: 1 addition & 1 deletion test/src/tests-session-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
urls,
MessageType,
MILLISECONDS_IN_ONE_MINUTE,
} from './config';
} from './config/constants';
import { IdentityApiData } from '@mparticle/web-sdk';
import Constants from '../../src/constants';

Expand Down
4 changes: 2 additions & 2 deletions test/src/tests-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { expect } from 'chai';
import sinon from 'sinon';
import { SDKInitConfig } from '../../src/sdkRuntimeModels';
import Store, { IStore } from '../../src/store';
import { MPConfig, apiKey } from './config';
import Utils from './utils';
import { MPConfig, apiKey } from './config/constants';
import Utils from './config/utils';
const MockSideloadedKit = Utils.MockSideloadedKit;

describe('Store', () => {
Expand Down

0 comments on commit d83d7e7

Please sign in to comment.