mirror of https://github.com/apache/nifi.git
[NIFI-12941] - adding in jest-preset-angular to enable unit testing in Idea based IDEs (#8580)
* [NIFI-12941] - adding in jest-preset-angular to enable unit testing in Idea-based IDEs * remove globalSetup jest config This closes #8580
This commit is contained in:
parent
8ef9528bf9
commit
e5827c1026
|
@ -184,7 +184,16 @@ const config: Config = {
|
||||||
// testRunner: "jest-circus/runner",
|
// testRunner: "jest-circus/runner",
|
||||||
|
|
||||||
// A map from regular expressions to paths to transformers
|
// A map from regular expressions to paths to transformers
|
||||||
transform: {},
|
transform: {
|
||||||
|
'^.+\\.(ts|mjs|js|html)$': [
|
||||||
|
'jest-preset-angular',
|
||||||
|
{
|
||||||
|
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||||
|
stringifyContentPathRegex: '\\.(html|svg)$',
|
||||||
|
useESM: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
|
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
|
||||||
transformIgnorePatterns: []
|
transformIgnorePatterns: []
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-prettier": "^5.0.1",
|
"eslint-plugin-prettier": "^5.0.1",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
|
"jest-preset-angular": "^14.0.3",
|
||||||
"nx": "18.1.3",
|
"nx": "18.1.3",
|
||||||
"postcss": "^8.4.32",
|
"postcss": "^8.4.32",
|
||||||
"prettier": "3.1.0",
|
"prettier": "3.1.0",
|
||||||
|
|
|
@ -72,6 +72,7 @@
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-prettier": "^5.0.1",
|
"eslint-plugin-prettier": "^5.0.1",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
|
"jest-preset-angular": "^14.0.3",
|
||||||
"nx": "18.1.3",
|
"nx": "18.1.3",
|
||||||
"postcss": "^8.4.32",
|
"postcss": "^8.4.32",
|
||||||
"prettier": "3.1.0",
|
"prettier": "3.1.0",
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
import 'jest-preset-angular/setup-jest';
|
||||||
|
|
||||||
// jsdom testing environment does not provide crypto functionality... provide a dummy implementation in its place.
|
// jsdom testing environment does not provide crypto functionality... provide a dummy implementation in its place.
|
||||||
window.crypto.randomUUID = () => {
|
window.crypto.randomUUID = () => {
|
||||||
|
|
Loading…
Reference in New Issue