diff --git a/sdk/appconfiguration/app-configuration/karma.conf.js b/sdk/appconfiguration/app-configuration/karma.conf.js index 8e4612ca4803..ee41e646f979 100644 --- a/sdk/appconfiguration/app-configuration/karma.conf.js +++ b/sdk/appconfiguration/app-configuration/karma.conf.js @@ -29,8 +29,8 @@ module.exports = function(config) { // polyfill service supporting IE11 missing features // Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys "https://cdn.polyfill.io/v2/polyfill.js?features=Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys|always", - "test-browser/index.js", - { pattern: "test-browser/index.js.map", type: "html", included: false, served: true } + "dist-test/index.browser.js", + { pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true } ], // list of files / patterns to exclude @@ -42,7 +42,7 @@ module.exports = function(config) { "**/*.js": ["env"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - // "test-browser/index.js": ["coverage"] + // "dist-test/index.browser.js": ["coverage"] }, // inject following environment values into browser testing with window.__env__ diff --git a/sdk/appconfiguration/app-configuration/package.json b/sdk/appconfiguration/app-configuration/package.json index 3e190dd592a2..bd0d76e20464 100644 --- a/sdk/appconfiguration/app-configuration/package.json +++ b/sdk/appconfiguration/app-configuration/package.json @@ -59,12 +59,12 @@ "swagger": "autorest --typescript swagger/swagger.md", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "npm run build:test:browser && cross-env TEST_MODE=live karma start --single-run", - "integration-test:node": "npm run build:test:node && nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/test/*.spec.js dist-esm/test/**/*.spec.js", + "integration-test:node": "npm run build:test:node && nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace \"dist-esm/test/*.spec.js\" \"dist-esm/test/**/*.spec.js\"", "test:browser": "npm run clean && npm run build:test:browser && npm run unit-test:browser", "test:node": "npm run clean && npm run build:test:node && npm run unit-test:node", "test": "npm run test:node && npm run test:browser", "unit-test:browser": "", - "unit-test:node": "npm run build:test:node && mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace test-dist/index.node.js", + "unit-test:node": "npm run build:test:node && mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace \"dist-test/index.node.js\"", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src" }, diff --git a/sdk/appconfiguration/app-configuration/rollup.base.config.js b/sdk/appconfiguration/app-configuration/rollup.base.config.js index d228c15497e0..77fb61abc2fa 100644 --- a/sdk/appconfiguration/app-configuration/rollup.base.config.js +++ b/sdk/appconfiguration/app-configuration/rollup.base.config.js @@ -76,7 +76,7 @@ export function nodeConfig(test = false) { ); // different output file - baseConfig.output.file = "test-dist/index.node.js"; + baseConfig.output.file = "dist-test/index.node.js"; // mark assert packages we use as external baseConfig.external.push("assert"); @@ -163,7 +163,7 @@ export function browserConfig(test = false) { ...[shim({ path: `export function join() {}`, dotenv: `export function config() { }` })] ); - baseConfig.output.file = "test-browser/index.js"; + baseConfig.output.file = "dist-test/index.browser.js"; // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also diff --git a/sdk/communication/communication-administration/karma.conf.js b/sdk/communication/communication-administration/karma.conf.js index ef2e157f2bc9..9b6f775567e2 100644 --- a/sdk/communication/communication-administration/karma.conf.js +++ b/sdk/communication/communication-administration/karma.conf.js @@ -50,7 +50,7 @@ module.exports = function(config) { "recordings/browsers/**/*.json": ["json"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - //"test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, // inject following environment values into browser testing with window.__env__ diff --git a/sdk/communication/communication-administration/package.json b/sdk/communication/communication-administration/package.json index fdc88dbad33a..9fb69dddd1fd 100644 --- a/sdk/communication/communication-administration/package.json +++ b/sdk/communication/communication-administration/package.json @@ -25,7 +25,7 @@ "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "generate-doc": "api-documenter markdown -i temp -o docGen", "integration-test:browser": "karma start --single-run", - "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 dist-esm/test/*.spec.js dist-esm/test/node/*.spec.js", + "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 \"dist-esm/test/*.spec.js\" \"dist-esm/test/node/*.spec.js\"", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", "lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o communication-administration-lintReport.html || exit 0", @@ -36,7 +36,7 @@ "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", "test:watch": "npm run test -- --watch --reporter min", "unit-test:browser": "karma start --single-run", - "unit-test:node": "mocha --reporter ../../../common/tools/mocha-multi-reporter.js dist-test/index.node.js", + "unit-test:node": "mocha --reporter ../../../common/tools/mocha-multi-reporter.js \"dist-test/index.node.js\"", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src" }, diff --git a/sdk/communication/communication-chat/karma.conf.js b/sdk/communication/communication-chat/karma.conf.js index f5205df939e8..cda56b717a6e 100644 --- a/sdk/communication/communication-chat/karma.conf.js +++ b/sdk/communication/communication-chat/karma.conf.js @@ -50,7 +50,7 @@ module.exports = function(config) { "recordings/browsers/**/*.json": ["json"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - //"test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, // inject following environment values into browser testing with window.__env__ diff --git a/sdk/communication/communication-chat/package.json b/sdk/communication/communication-chat/package.json index 25fa78b047f4..244151777634 100644 --- a/sdk/communication/communication-chat/package.json +++ b/sdk/communication/communication-chat/package.json @@ -20,7 +20,7 @@ "extract-api": "tsc -p . && api-extractor run --local", "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "integration-test:browser": "karma start --single-run", - "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 dist-esm/test/*.spec.js dist-esm/test/node/*.spec.js", + "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 \"dist-esm/test/*.spec.js\" \"dist-esm/test/node/*.spec.js\"", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", "lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o communication-chat-lintReport.html || exit 0", @@ -30,7 +30,7 @@ "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", "test": "npm run build:test && npm run unit-test && npm run integration-test", "unit-test:browser": "karma start --single-run", - "unit-test:node": "mocha --reporter ../../../common/tools/mocha-multi-reporter.js dist-test/index.node.js", + "unit-test:node": "mocha --reporter ../../../common/tools/mocha-multi-reporter.js \"dist-test/index.node.js\"", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src" }, diff --git a/sdk/communication/communication-common/karma.conf.js b/sdk/communication/communication-common/karma.conf.js index d030db4754ae..8891a2948886 100644 --- a/sdk/communication/communication-common/karma.conf.js +++ b/sdk/communication/communication-common/karma.conf.js @@ -37,10 +37,10 @@ module.exports = function(config) { // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { - "**/*.js": ["env"], + "**/*.js": ["env"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - "test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, // inject following environment values into browser testing with window.__env__ diff --git a/sdk/communication/communication-identity/karma.conf.js b/sdk/communication/communication-identity/karma.conf.js index acf7be7b0162..58e1c707a71c 100644 --- a/sdk/communication/communication-identity/karma.conf.js +++ b/sdk/communication/communication-identity/karma.conf.js @@ -50,7 +50,7 @@ module.exports = function(config) { "recordings/browsers/**/*.json": ["json"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - //"test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, // inject following environment values into browser testing with window.__env__ diff --git a/sdk/communication/communication-phone-numbers/karma.conf.js b/sdk/communication/communication-phone-numbers/karma.conf.js index 2b047521265f..8e3dc571ca62 100644 --- a/sdk/communication/communication-phone-numbers/karma.conf.js +++ b/sdk/communication/communication-phone-numbers/karma.conf.js @@ -50,7 +50,7 @@ module.exports = function(config) { "recordings/browsers/**/*.json": ["json"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - //"test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, // inject following environment values into browser testing with window.__env__ diff --git a/sdk/communication/communication-sms/karma.conf.js b/sdk/communication/communication-sms/karma.conf.js index 1b614cf35327..31e65fe0c50c 100644 --- a/sdk/communication/communication-sms/karma.conf.js +++ b/sdk/communication/communication-sms/karma.conf.js @@ -50,7 +50,7 @@ module.exports = function(config) { "recordings/browsers/**/*.json": ["json"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - // "test-browser/index.js": ["coverage"] + // "dist-test/index.browser.js": ["coverage"] }, // inject following environment values into browser testing with window.__env__ diff --git a/sdk/containerregistry/container-registry/karma.conf.js b/sdk/containerregistry/container-registry/karma.conf.js index 512625277aba..0bc3f8f50540 100644 --- a/sdk/containerregistry/container-registry/karma.conf.js +++ b/sdk/containerregistry/container-registry/karma.conf.js @@ -47,10 +47,10 @@ module.exports = function(config) { // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { "**/*.js": ["env"], - "recordings/browsers/**/*.json": ["json"], + "recordings/browsers/**/*.json": ["json"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - "test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, envPreprocessor: [ diff --git a/sdk/core/abort-controller/karma.conf.js b/sdk/core/abort-controller/karma.conf.js index 6b8984ed3927..c85a32683f0c 100644 --- a/sdk/core/abort-controller/karma.conf.js +++ b/sdk/core/abort-controller/karma.conf.js @@ -26,8 +26,8 @@ module.exports = function(config) { // list of files / patterns to load in the browser files: [ - "test-browser/index.js", - { pattern: "test-browser/index.js.map", type: "html", included: false, served: true } + "dist-test/index.browser.js", + { pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true } ], // list of files / patterns to exclude @@ -36,10 +36,10 @@ module.exports = function(config) { // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { - "**/*.js": ["sourcemap", "env"], + "**/*.js": ["sourcemap", "env"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - "test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, // test results reporter to use diff --git a/sdk/core/abort-controller/rollup.base.config.js b/sdk/core/abort-controller/rollup.base.config.js index ee3203a27837..4eb630539d97 100644 --- a/sdk/core/abort-controller/rollup.base.config.js +++ b/sdk/core/abort-controller/rollup.base.config.js @@ -103,7 +103,7 @@ export function browserConfig(test = false) { console.log("yes test"); baseConfig.input = "dist-esm/test/**/*.spec.js"; baseConfig.plugins.unshift(multiEntry({ exports: false })); - baseConfig.output.file = "test-browser/index.js"; + baseConfig.output.file = "dist-test/index.browser.js"; baseConfig.context = "null"; // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting diff --git a/sdk/core/core-amqp/karma.conf.js b/sdk/core/core-amqp/karma.conf.js index d5e143cb4ce8..2f8b8d12bdc3 100644 --- a/sdk/core/core-amqp/karma.conf.js +++ b/sdk/core/core-amqp/karma.conf.js @@ -17,8 +17,8 @@ module.exports = function(config) { // list of files / patterns to load in the browser files: [ - "test-browser/index.js", - { pattern: "test-browser/index.js.map", type: "html", included: false, served: true } + "dist-test/index.browser.js", + { pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true } ], // list of files / patterns to exclude diff --git a/sdk/core/core-amqp/rollup.base.config.js b/sdk/core/core-amqp/rollup.base.config.js index 767ab746ac61..9bac242ff489 100644 --- a/sdk/core/core-amqp/rollup.base.config.js +++ b/sdk/core/core-amqp/rollup.base.config.js @@ -140,7 +140,7 @@ export function browserConfig(test = false) { if (test) { baseConfig.input = ["dist-esm/test/*.spec.js", "dist-esm/test/browser/*.spec.js"]; baseConfig.plugins.unshift(multiEntry({ exports: false })); - baseConfig.output.file = "test-browser/index.js"; + baseConfig.output.file = "dist-test/index.browser.js"; // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also diff --git a/sdk/core/core-auth/rollup.base.config.js b/sdk/core/core-auth/rollup.base.config.js index ef9eed32411a..3e52f1a83412 100644 --- a/sdk/core/core-auth/rollup.base.config.js +++ b/sdk/core/core-auth/rollup.base.config.js @@ -86,7 +86,7 @@ export function browserConfig(test = false) { if (test) { baseConfig.input = "dist-esm/test/**/*.spec.js"; baseConfig.plugins.unshift(multiEntry({ exports: false })); - baseConfig.output.file = "test-browser/index.js"; + baseConfig.output.file = "dist-test/index.browser.js"; // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also diff --git a/sdk/core/core-client/karma.conf.js b/sdk/core/core-client/karma.conf.js index 76c2cfed347f..bae781d5ae5a 100644 --- a/sdk/core/core-client/karma.conf.js +++ b/sdk/core/core-client/karma.conf.js @@ -37,10 +37,10 @@ module.exports = function(config) { // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { - "**/*.js": ["sourcemap", "env"], + "**/*.js": ["sourcemap", "env"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - "test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, // inject following environment values into browser testing with window.__env__ diff --git a/sdk/core/core-http/package.json b/sdk/core/core-http/package.json index 8734708d9251..6d20f08f7f1e 100644 --- a/sdk/core/core-http/package.json +++ b/sdk/core/core-http/package.json @@ -66,13 +66,11 @@ }, "scripts": { "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build": "run-s build:tsc extract-api:nobuild build:types build:rollup", + "build": "tsc -p tsconfig.es.json && npm run build:nodebrowser && npm run extract-api:nobuild && npm run build:types", "build:scripts": "tsc -p ./.scripts/", - "build:test": "run-s build build:test-browser", - "build:tsc": "tsc -p tsconfig.es.json", + "build:test": "tsc -p tsconfig.es.json && rollup -c rollup.test.config.js 2>&1", "build:types": "downlevel-dts types/latest/ types/3.1/", - "build:rollup": "rollup -c 2>&1", - "build:test-browser": "rollup -c rollup.test.config.js 2>&1", + "build:nodebrowser": "rollup -c 2>&1", "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "clean": "rimraf ./es ./dist ./dist-test ./dist-browser ./types ./types3.1 ./coverage ./temp ./*.tgz", "execute:samples": "echo skipped", diff --git a/sdk/core/core-lro/karma.conf.js b/sdk/core/core-lro/karma.conf.js index 60b2c7fe0389..e7b1abf9a680 100644 --- a/sdk/core/core-lro/karma.conf.js +++ b/sdk/core/core-lro/karma.conf.js @@ -31,8 +31,8 @@ module.exports = function(config) { exclude: [], preprocessors: { - "**/*.js": ["sourcemap", "env"], - "dist-test/index.browser.js": ["coverage"] + "**/*.js": ["sourcemap", "env"] + //"dist-test/index.browser.js": ["coverage"] }, reporters: ["mocha", "coverage", "junit"], diff --git a/sdk/core/core-tracing/rollup.base.config.js b/sdk/core/core-tracing/rollup.base.config.js index c762f670b2ee..04bf7b198c7d 100644 --- a/sdk/core/core-tracing/rollup.base.config.js +++ b/sdk/core/core-tracing/rollup.base.config.js @@ -89,7 +89,7 @@ export function browserConfig(test = false) { if (test) { baseConfig.input = "dist-esm/test/**/*.spec.js"; baseConfig.plugins.unshift(multiEntry({ exports: false })); - baseConfig.output.file = "test-browser/index.js"; + baseConfig.output.file = "dist-test/index.browser.js"; // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also diff --git a/sdk/core/core-util/karma.conf.js b/sdk/core/core-util/karma.conf.js index 76c2cfed347f..bae781d5ae5a 100644 --- a/sdk/core/core-util/karma.conf.js +++ b/sdk/core/core-util/karma.conf.js @@ -37,10 +37,10 @@ module.exports = function(config) { // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { - "**/*.js": ["sourcemap", "env"], + "**/*.js": ["sourcemap", "env"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - "test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, // inject following environment values into browser testing with window.__env__ diff --git a/sdk/core/core-xml/karma.conf.js b/sdk/core/core-xml/karma.conf.js index 76c2cfed347f..bae781d5ae5a 100644 --- a/sdk/core/core-xml/karma.conf.js +++ b/sdk/core/core-xml/karma.conf.js @@ -37,10 +37,10 @@ module.exports = function(config) { // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { - "**/*.js": ["sourcemap", "env"], + "**/*.js": ["sourcemap", "env"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - "test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, // inject following environment values into browser testing with window.__env__ diff --git a/sdk/core/logger/karma.conf.js b/sdk/core/logger/karma.conf.js index ecd3df696832..785309ebb18c 100644 --- a/sdk/core/logger/karma.conf.js +++ b/sdk/core/logger/karma.conf.js @@ -29,8 +29,8 @@ module.exports = function(config) { // list of files / patterns to load in the browser files: [ - "test-browser/index.js", - { pattern: "test-browser/index.js.map", type: "html", included: false, served: true } + "dist-test/index.browser.js", + { pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true } ], // list of files / patterns to exclude @@ -42,7 +42,7 @@ module.exports = function(config) { "**/*.js": ["env"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - // "test-browser/index.js": ["coverage"] + // "dist-test/index.browser.js": ["coverage"] }, // test results reporter to use diff --git a/sdk/core/logger/rollup.base.config.js b/sdk/core/logger/rollup.base.config.js index 50de29d029db..22e4dd35af25 100644 --- a/sdk/core/logger/rollup.base.config.js +++ b/sdk/core/logger/rollup.base.config.js @@ -103,7 +103,7 @@ export function browserConfig(test = false) { // Entry points - test files under the `test` folder(common for both browser and node), browser specific test files baseConfig.input = ["dist-esm/test/*.spec.js", "dist-esm/test/browser/*.spec.js"]; baseConfig.plugins.unshift(multiEntry({ exports: false })); - baseConfig.output.file = "test-browser/index.js"; + baseConfig.output.file = "dist-test/index.browser.js"; baseConfig.context = "null"; baseConfig.onwarn = (warning) => { diff --git a/sdk/digitaltwins/digital-twins-core/karma.conf.js b/sdk/digitaltwins/digital-twins-core/karma.conf.js index 167f95407e3c..8b2ba1e65014 100644 --- a/sdk/digitaltwins/digital-twins-core/karma.conf.js +++ b/sdk/digitaltwins/digital-twins-core/karma.conf.js @@ -37,8 +37,8 @@ module.exports = function(config) { // polyfill service supporting IE11 missing features // Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys "https://cdn.polyfill.io/v2/polyfill.js?features=Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys|always", - "test-browser/index.js", - { pattern: "test-browser/index.js.map", type: "html", included: false, served: true } + "dist-test/index.browser.js", + { pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true } ].concat(isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : []), // list of files / patterns to exclude @@ -50,8 +50,7 @@ module.exports = function(config) { "**/*.js": ["sourcemap", "env"], // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - // "test-browser/index.js": ["coverage"] - "dist-test/index.browser.js": ["coverage"], + // "dist-test/index.browser.js": ["coverage"] "recordings/browsers/**/*.json": ["json"] }, diff --git a/sdk/digitaltwins/digital-twins-core/rollup.base.config.js b/sdk/digitaltwins/digital-twins-core/rollup.base.config.js index f4de165eb251..70facb8085ac 100644 --- a/sdk/digitaltwins/digital-twins-core/rollup.base.config.js +++ b/sdk/digitaltwins/digital-twins-core/rollup.base.config.js @@ -142,7 +142,7 @@ export function browserConfig(test = false) { ...[shim({ path: `export function join() {}`, dotenv: `export function config() { }` })] ); - baseConfig.output.file = "test-browser/index.js"; + baseConfig.output.file = "dist-test/index.browser.js"; // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also diff --git a/sdk/eventgrid/eventgrid/karma.conf.js b/sdk/eventgrid/eventgrid/karma.conf.js index 3f9e6042b3d9..35472f6af2cf 100644 --- a/sdk/eventgrid/eventgrid/karma.conf.js +++ b/sdk/eventgrid/eventgrid/karma.conf.js @@ -50,7 +50,7 @@ module.exports = function(config) { "recordings/browsers/**/*.json": ["json"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - // "test-browser/index.js": ["coverage"] + // "dist-test/index.browser.js": ["coverage"] }, envPreprocessor: [ diff --git a/sdk/eventhub/event-hubs/karma.conf.js b/sdk/eventhub/event-hubs/karma.conf.js index 11ce43dceffe..2708a0b7474c 100644 --- a/sdk/eventhub/event-hubs/karma.conf.js +++ b/sdk/eventhub/event-hubs/karma.conf.js @@ -29,8 +29,8 @@ module.exports = function(config) { // polyfill service supporting IE11 missing features // Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys "https://cdn.polyfill.io/v2/polyfill.js?features=Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys|always", - "test-browser/index.js", - { pattern: "test-browser/index.js.map", type: "html", included: false, served: true } + "dist-test/index.browser.js", + { pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true } ], // list of files / patterns to exclude @@ -42,7 +42,7 @@ module.exports = function(config) { "**/*.js": ["env"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - // "test-browser/index.js": ["coverage"] + // "dist-test/index.browser.js": ["coverage"] }, // inject following environment values into browser testing with window.__env__ diff --git a/sdk/eventhub/event-hubs/rollup.base.config.js b/sdk/eventhub/event-hubs/rollup.base.config.js index cd08838732c4..b09c0a7075a6 100644 --- a/sdk/eventhub/event-hubs/rollup.base.config.js +++ b/sdk/eventhub/event-hubs/rollup.base.config.js @@ -149,7 +149,7 @@ export function browserConfig(test = false) { "dist-esm/test/internal/impl/*.spec.js" ]; baseConfig.plugins.unshift(multiEntry({ exports: false })); - baseConfig.output.file = "test-browser/index.js"; + baseConfig.output.file = "dist-test/index.browser.js"; // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also diff --git a/sdk/eventhub/event-processor-host/rollup.base.config.js b/sdk/eventhub/event-processor-host/rollup.base.config.js index dee5ae63b72d..21e7faa9775d 100644 --- a/sdk/eventhub/event-processor-host/rollup.base.config.js +++ b/sdk/eventhub/event-processor-host/rollup.base.config.js @@ -107,7 +107,7 @@ export function browserConfig(test = false) { if (test) { baseConfig.input = "dist-esm/test/**/*.spec.js"; baseConfig.plugins.unshift(multiEntry({ exports: false })); - baseConfig.output.file = "test-browser/index.js"; + baseConfig.output.file = "dist-test/index.browser.js"; // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also diff --git a/sdk/eventhub/eventhubs-checkpointstore-blob/rollup.base.config.js b/sdk/eventhub/eventhubs-checkpointstore-blob/rollup.base.config.js index a0a8b65f3daa..bdd947fa5fdd 100644 --- a/sdk/eventhub/eventhubs-checkpointstore-blob/rollup.base.config.js +++ b/sdk/eventhub/eventhubs-checkpointstore-blob/rollup.base.config.js @@ -153,7 +153,7 @@ export function browserConfig(test = false) { if (test) { baseConfig.input = "dist-esm/test/**/*.spec.js"; baseConfig.plugins.unshift(multiEntry({ exports: false })); - baseConfig.output.file = "test-browser/index.js"; + baseConfig.output.file = "dist-test/index.browser.js"; // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also diff --git a/sdk/formrecognizer/ai-form-recognizer/karma.conf.js b/sdk/formrecognizer/ai-form-recognizer/karma.conf.js index fe5ddb3bac6a..c0e7902e1aca 100644 --- a/sdk/formrecognizer/ai-form-recognizer/karma.conf.js +++ b/sdk/formrecognizer/ai-form-recognizer/karma.conf.js @@ -48,10 +48,10 @@ module.exports = function(config) { // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { "**/*.js": ["sourcemap", "env"], - "recordings/browsers/**/*.json": ["json"], + "recordings/browsers/**/*.json": ["json"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - "test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, envPreprocessor: [ diff --git a/sdk/identity/identity/karma.conf.js b/sdk/identity/identity/karma.conf.js index 243e000ca78c..ff05cce70748 100644 --- a/sdk/identity/identity/karma.conf.js +++ b/sdk/identity/identity/karma.conf.js @@ -30,8 +30,8 @@ module.exports = function(config) { // polyfill service supporting IE11 missing features // Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys "https://cdn.polyfill.io/v2/polyfill.js?features=Symbol,Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys|always", - "test-browser/index.js", - { pattern: "test-browser/index.js.map", type: "html", included: false, served: true } + "dist-test/index.browser.js", + { pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true } ], // list of files / patterns to exclude @@ -43,7 +43,7 @@ module.exports = function(config) { "**/*.js": ["sourcemap", "env"], // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - // "test-browser/index.js": ["coverage"], + // "dist-test/index.browser.js": ["coverage"], "recordings/browsers/**/*.json": ["json"] }, diff --git a/sdk/identity/identity/rollup.base.config.js b/sdk/identity/identity/rollup.base.config.js index 444bea458f15..bd8670e9267f 100644 --- a/sdk/identity/identity/rollup.base.config.js +++ b/sdk/identity/identity/rollup.base.config.js @@ -102,7 +102,7 @@ export function browserConfig(test = false) { "dist-esm/test/internal/browser/*.spec.js" ]; baseConfig.plugins.unshift(multiEntry({ exports: false })); - baseConfig.output.file = "test-browser/index.js"; + baseConfig.output.file = "dist-test/index.browser.js"; // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also diff --git a/sdk/metricsadvisor/ai-metrics-advisor/karma.conf.js b/sdk/metricsadvisor/ai-metrics-advisor/karma.conf.js index cec7ad805eca..d28f01e11c5a 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/karma.conf.js +++ b/sdk/metricsadvisor/ai-metrics-advisor/karma.conf.js @@ -48,10 +48,10 @@ module.exports = function(config) { // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { "**/*.js": ["sourcemap", "env"], - "recordings/browsers/**/*.json": ["json"], + "recordings/browsers/**/*.json": ["json"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - "test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, envPreprocessor: [ diff --git a/sdk/quantum/quantum-jobs/package.json b/sdk/quantum/quantum-jobs/package.json index 132ccf29f1e6..524c14e6410d 100644 --- a/sdk/quantum/quantum-jobs/package.json +++ b/sdk/quantum/quantum-jobs/package.json @@ -28,7 +28,7 @@ "extract-api": "tsc -p . && api-extractor run --local", "format": "echo skip format as this package has only auto generated code", "integration-test:browser": "echo skipped", - "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/test/*.spec.js dist-esm/test/**/*.spec.js --harmony", + "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace \"dist-esm/test/*.spec.js\" \"dist-esm/test/**/*.spec.js\" --harmony", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", "lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o search-lintReport.html || exit 0", @@ -38,7 +38,7 @@ "test:browser": "npm run clean && npm run build:test:browser && npm run unit-test:browser", "test": "npm run clean && npm run build:test && npm run unit-test", "unit-test:browser": "echo skipped", - "unit-test:node": "mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-test/index.node.js --harmony", + "unit-test:node": "mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace \"dist-test/index.node.js\" --harmony", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src" }, diff --git a/sdk/servicebus/service-bus/rollup.base.config.js b/sdk/servicebus/service-bus/rollup.base.config.js index 7bcd8865850c..905e70b61ead 100644 --- a/sdk/servicebus/service-bus/rollup.base.config.js +++ b/sdk/servicebus/service-bus/rollup.base.config.js @@ -166,7 +166,7 @@ export function browserConfig(test = false) { "dist-esm/test/internal/unit/*.spec.js" ]; baseConfig.plugins.unshift(multiEntry({ exports: false })); - baseConfig.output.file = "test-browser/index.js"; + baseConfig.output.file = "dist-test/index.browser.js"; // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also diff --git a/sdk/storage/storage-internal-avro/karma.conf.js b/sdk/storage/storage-internal-avro/karma.conf.js index 86d46f6139e2..0c0ee059e156 100644 --- a/sdk/storage/storage-internal-avro/karma.conf.js +++ b/sdk/storage/storage-internal-avro/karma.conf.js @@ -51,7 +51,7 @@ module.exports = function(config) { "**/*.js": ["sourcemap", "env"], // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - "dist-test/index.browser.js": ["coverage"], + //"dist-test/index.browser.js": ["coverage"], "recordings/browsers/**/*.json": ["json"] }, diff --git a/sdk/template/template/karma.conf.js b/sdk/template/template/karma.conf.js index 9bca108da550..a244521314fc 100644 --- a/sdk/template/template/karma.conf.js +++ b/sdk/template/template/karma.conf.js @@ -47,10 +47,10 @@ module.exports = function(config) { // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { "**/*.js": ["env"], - "recordings/browsers/**/*.json": ["json"], + "recordings/browsers/**/*.json": ["json"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - "test-browser/index.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, envPreprocessor: [ diff --git a/sdk/test-utils/perfstress/karma.conf.js b/sdk/test-utils/perfstress/karma.conf.js index c0b8af591cbb..a5d11c3bcaa4 100644 --- a/sdk/test-utils/perfstress/karma.conf.js +++ b/sdk/test-utils/perfstress/karma.conf.js @@ -28,10 +28,10 @@ module.exports = function(config) { // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { - "**/*.js": ["sourcemap", "env"], + "**/*.js": ["sourcemap", "env"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable - "dist-test/index.browser.js": ["coverage"] + //"dist-test/index.browser.js": ["coverage"] }, // inject following environment values into browser testing with window.__env__