Add support for Ember Exam

This allows us to partition and load balance tests, if we like.
This commit is contained in:
Robin Ward 2021-11-11 13:30:12 -05:00
parent 388f45c570
commit d1dec23a93
3 changed files with 135 additions and 5 deletions

View File

@ -17,6 +17,7 @@
},
"dependencies": {
"@babel/core": "^7.14.3",
"@discourse/itsatrap": "^2.0.10",
"@ember/optional-features": "^1.1.0",
"@ember/test-helpers": "^2.2.0",
"@glimmer/component": "^1.0.0",
@ -60,8 +61,7 @@
"sass": "^1.32.8",
"select-kit": "^1.0.0",
"sinon": "^9.2.0",
"virtual-dom": "^2.1.1",
"@discourse/itsatrap": "^2.0.10"
"virtual-dom": "^2.1.1"
},
"engines": {
"node": ">= 12.*",
@ -75,5 +75,8 @@
"paths": [
"lib/bootstrap-json"
]
},
"devDependencies": {
"ember-exam": "6.1.0"
}
}

View File

@ -1,6 +1,7 @@
import config from "../config/environment";
import { setEnvironment } from "discourse-common/config/environment";
import { start } from "ember-qunit";
import loadEmberExam from "ember-exam/test-support/load";
setEnvironment("testing");
@ -20,5 +21,7 @@ document.addEventListener("discourse-booted", () => {
);
setupTests(config.APP);
start({ setupTestContainer: false });
let loader = loadEmberExam();
loader.loadModules();
start({ setupTestContainer: false, loadTests: false });
});

View File

@ -1018,6 +1018,45 @@
walk-sync "^1.1.3"
wrap-legacy-hbs-plugin-if-needed "^1.0.1"
"@embroider/core@0.36.0":
version "0.36.0"
resolved "https://registry.yarnpkg.com/@embroider/core/-/core-0.36.0.tgz#fbbd60d29c3fcbe02b4e3e63e6043a43de2b9ce3"
integrity sha512-J6esENP+aNt+/r070cF1RCJyCi/Rn1I6uFp37vxyLWwvGDuT0E7wGcaPU29VBkBFqxi4Z1n4F796BaGHv+kX6w==
dependencies:
"@babel/core" "^7.12.3"
"@babel/parser" "^7.12.3"
"@babel/plugin-syntax-dynamic-import" "^7.8.3"
"@babel/plugin-transform-runtime" "^7.12.1"
"@babel/runtime" "^7.12.5"
"@babel/traverse" "^7.12.1"
"@babel/types" "^7.12.1"
"@embroider/macros" "0.36.0"
assert-never "^1.1.0"
babel-plugin-syntax-dynamic-import "^6.18.0"
broccoli-node-api "^1.7.0"
broccoli-persistent-filter "^3.1.2"
broccoli-plugin "^4.0.1"
broccoli-source "^3.0.0"
debug "^3.1.0"
escape-string-regexp "^4.0.0"
fast-sourcemap-concat "^1.4.0"
filesize "^4.1.2"
fs-extra "^7.0.1"
fs-tree-diff "^2.0.0"
handlebars "^4.4.2"
js-string-escape "^1.0.1"
jsdom "^16.4.0"
json-stable-stringify "^1.0.1"
lodash "^4.17.10"
pkg-up "^3.1.0"
resolve "^1.8.1"
resolve-package-path "^1.2.2"
semver "^7.3.2"
strip-bom "^3.0.0"
typescript-memoize "^1.0.0-alpha.3"
walk-sync "^1.1.3"
wrap-legacy-hbs-plugin-if-needed "^1.0.1"
"@embroider/macros@0.33.0":
version "0.33.0"
resolved "https://registry.yarnpkg.com/@embroider/macros/-/macros-0.33.0.tgz#d5826ea7565bb69b57ba81ed528315fe77acbf9d"
@ -1033,6 +1072,21 @@
resolve "^1.8.1"
semver "^7.3.2"
"@embroider/macros@0.36.0", "@embroider/macros@^0.36.0":
version "0.36.0"
resolved "https://registry.yarnpkg.com/@embroider/macros/-/macros-0.36.0.tgz#5330f1e6f12112f0f68e34b3e4855dc7dd3c69a5"
integrity sha512-w37G4uXG+Wi3K3EHSFBSr/n6kGFXYG8nzZ9ptzDOC7LP3Oh5/MskBnVZW3+JkHXUPEqKsDGlxPxCVpPl1kQyjQ==
dependencies:
"@babel/core" "^7.12.3"
"@babel/traverse" "^7.12.1"
"@babel/types" "^7.12.1"
"@embroider/core" "0.36.0"
assert-never "^1.1.0"
ember-cli-babel "^7.23.0"
lodash "^4.17.10"
resolve "^1.8.1"
semver "^7.3.2"
"@eslint/eslintrc@^0.4.1":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.1.tgz#442763b88cecbe3ee0ec7ca6d6dd6168550cbf14"
@ -3939,6 +3993,16 @@ cli-table3@^0.5.1:
optionalDependencies:
colors "^1.1.2"
cli-table3@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.0.tgz#b7b1bc65ca8e7b5cef9124e13dc2b21e2ce4faee"
integrity sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==
dependencies:
object-assign "^4.1.0"
string-width "^4.2.0"
optionalDependencies:
colors "^1.1.2"
cli-table@^0.3.1:
version "0.3.6"
resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.6.tgz#e9d6aa859c7fe636981fd3787378c2a20bce92fc"
@ -4414,6 +4478,13 @@ debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
dependencies:
ms "2.1.2"
debug@^4.2.0:
version "4.3.2"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==
dependencies:
ms "2.1.2"
debug@~3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
@ -4786,6 +4857,39 @@ ember-cli-babel@^7.0.0, ember-cli-babel@^7.11.0, ember-cli-babel@^7.11.1, ember-
rimraf "^3.0.1"
semver "^5.5.0"
ember-cli-babel@^7.21.0:
version "7.26.6"
resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.26.6.tgz#322fbbd3baad9dd99e3276ff05bc6faef5e54b39"
integrity sha512-040svtfj2RC35j/WMwdWJFusZaXmNoytLAMyBDGLMSlRvznudTxZjGlPV6UupmtTBApy58cEF8Fq4a+COWoEmQ==
dependencies:
"@babel/core" "^7.12.0"
"@babel/helper-compilation-targets" "^7.12.0"
"@babel/plugin-proposal-class-properties" "^7.13.0"
"@babel/plugin-proposal-decorators" "^7.13.5"
"@babel/plugin-transform-modules-amd" "^7.13.0"
"@babel/plugin-transform-runtime" "^7.13.9"
"@babel/plugin-transform-typescript" "^7.13.0"
"@babel/polyfill" "^7.11.5"
"@babel/preset-env" "^7.12.0"
"@babel/runtime" "7.12.18"
amd-name-resolver "^1.3.1"
babel-plugin-debug-macros "^0.3.4"
babel-plugin-ember-data-packages-polyfill "^0.1.2"
babel-plugin-ember-modules-api-polyfill "^3.5.0"
babel-plugin-module-resolver "^3.2.0"
broccoli-babel-transpiler "^7.8.0"
broccoli-debug "^0.6.4"
broccoli-funnel "^2.0.2"
broccoli-source "^2.1.2"
clone "^2.1.2"
ember-cli-babel-plugin-helpers "^1.1.1"
ember-cli-version-checker "^4.1.0"
ensure-posix-path "^1.0.2"
fixturify-project "^1.10.0"
resolve-package-path "^3.1.0"
rimraf "^3.0.1"
semver "^5.5.0"
ember-cli-dependency-checker@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/ember-cli-dependency-checker/-/ember-cli-dependency-checker-3.2.0.tgz#9202ad9e14d6fda33cffc22a11c343c2a8885330"
@ -5151,6 +5255,26 @@ ember-disable-prototype-extensions@^1.1.3:
resolved "https://registry.yarnpkg.com/ember-disable-prototype-extensions/-/ember-disable-prototype-extensions-1.1.3.tgz#1969135217654b5e278f9fe2d9d4e49b5720329e"
integrity sha1-GWkTUhdlS14nj5/i2dTkm1cgMp4=
ember-exam@6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/ember-exam/-/ember-exam-6.1.0.tgz#1ea2c0ece27ac8ad6a80d959b1c207611b7dfdd7"
integrity sha512-H9tg7eUgqkjAsr1/15UzxGyZobGLgsyTi56Ng0ySnkYGCRfvVpwtVc3xgcNOFnUaa9RExUFpxC0adjW3K87Uxw==
dependencies:
"@embroider/macros" "^0.36.0"
chalk "^4.1.0"
cli-table3 "^0.6.0"
debug "^4.2.0"
ember-auto-import "^1.10.1"
ember-cli-babel "^7.21.0"
ember-cli-version-checker "^5.1.2"
execa "^4.0.3"
fs-extra "^9.0.1"
js-yaml "^3.14.0"
npmlog "^4.1.2"
rimraf "^3.0.2"
semver "^7.3.2"
silent-error "^1.1.1"
ember-export-application-global@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/ember-export-application-global/-/ember-export-application-global-2.0.1.tgz#b120a70e322ab208defc9e2daebe8d0dfc2dcd46"
@ -5796,7 +5920,7 @@ execa@^2.0.0:
signal-exit "^3.0.2"
strip-final-newline "^2.0.0"
execa@^4.0.0, execa@^4.1.0:
execa@^4.0.0, execa@^4.0.3, execa@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a"
integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==
@ -8850,7 +8974,7 @@ npm-run-path@^4.0.0:
dependencies:
path-key "^3.0.0"
npmlog@^4.0.0:
npmlog@^4.0.0, npmlog@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==