Skip to content

Commit

Permalink
this commit has sinon working
Browse files Browse the repository at this point in the history
  • Loading branch information
rmi22186 committed Oct 17, 2023
1 parent 6ebb511 commit 22c7dbc
Show file tree
Hide file tree
Showing 14 changed files with 76,860 additions and 5,956 deletions.
37,447 changes: 31,552 additions & 5,895 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"build": "cross-env ENVIRONMENT=prod BUILDALL=true rollup --config rollup.config.js",
"build:dev": "cross-env ENVIRONMENT=dev BUILD=iife rollup --config rollup.config.js",
"build:iife": "cross-env ENVIRONMENT=prod BUILD=iife rollup --config rollup.config.js",
"build:tests": "cross-env ENVIRONMENT=prod BUILD=tests rollup --config rollup.config.js",
"build:npm": "cross-env ENVIRONMENT=prod BUILD=cjs rollup --config rollup.config.js",
"build:esm": "cross-env ENVIRONMENT=prod BUILD=esm rollup --config rollup.config.js",
"build:stub": "cross-env ENVIRONMENT=prod BUILD=stub rollup --config rollup.config.js",
Expand All @@ -35,6 +36,7 @@
"build:rollup:module": "rollup --config test/integrations/module/rollup/rollup.config.js",
"build:webpack:module": "webpack --config test/integrations/module/webpack/webpack.config.js",
"build:ts": "tsc -p .",
"build:CBT": "rollup --config test/cross-browser-testing/rollup.CBT.config.js",
"test": "npm run build && npm run build:test-bundle && cross-env DEBUG=false karma start test/karma.config.js",
"test:browserstack": "karma start test/cross-browser-testing/browserstack.karma.config.js",
"test:browserstack:debug": "cross-env DEBUG=true karma start test/cross-browser-testing/browserstack.karma.config.js",
Expand Down Expand Up @@ -128,7 +130,7 @@
"rollup": "^2.75.7",
"shelljs": "^0.8.4",
"should": "^7.1.0",
"sinon": "^11.0.0",
"sinon": "^16.1.0",
"ts-jest": "^29.1.0",
"tslib": "^2.1.0",
"typescript": "^5.0.2",
Expand All @@ -138,6 +140,7 @@
},
"dependencies": {
"@babel/runtime": "^7.6.0",
"core-js": "^3.33.0",
"slugify": "^1.3.6"
}
}
27 changes: 26 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
const extensions = ['.js', '.ts'];

import babelSettings from 'test/cross-browser-testing/babel.config.mjs';
const defaultOutputOptions = {
name: 'mParticle',
strict: false,
sourcemap: ENVIRONMENT !== 'prod' ? 'inline' : false,
// sourcemap: ENVIRONMENT !== 'prod' ? 'inline' : false,
};

const defaultBabel = babel({
Expand All @@ -19,6 +20,14 @@ const defaultBabel = babel({
babelHelpers: 'runtime',
});

const testBabel = babel({
...babelSettings,
// extensions,
// include: ['src/**/*'],
babelHelpers: 'runtime',
plugins: ['@babel/plugin-transform-runtime'],
});

const babelMinify = babel({
extensions,
include: ['src/**/*'],
Expand Down Expand Up @@ -55,6 +64,22 @@ const builds = {
json(),
],
},
tests: {
input: 'test/cross-browser-testing/test-cross-browser.js',
output: {
...defaultOutputOptions,
file: 'dist/CBT.js',
format: 'iife',
name: 'mParticle',
},
plugins: [
resolve(),
commonjs({
// include: 'node_modules/**',
}),
testBabel,
],
},
cjs: {
input: 'src/mparticle-instance-manager.js',
output: {
Expand Down
Loading

0 comments on commit 22c7dbc

Please sign in to comment.