Skip to content

Commit

Permalink
BUGFIX: unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebobo committed Mar 8, 2023
1 parent 36926e3 commit 87c1622
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extension": ["ts"],
"spec": "Resources/Private/JavaScript/**/*.spec.ts",
"require": "ts-node/register"
}
2 changes: 1 addition & 1 deletion Resources/Private/JavaScript/core/src/domain/SearchTerm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class SearchTerm {
if (matches && matches[1]) {
this.assetIdentifier = matches[1];
} else {
this.assetIdentifier = 'hallo';
this.assetIdentifier = null;
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"postinstall": "patch-package",
"lint": "tsc --noemit && eslint 'Resources/Private/JavaScript/**/*.{js,jsx,ts,tsx}'",
"test": "testcafe",
"test:unit": "mocha -r ts-node/register ./Resources/Private/JavaScript/**/*.spec.ts",
"test:unit": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
"dev": "yarn workspace @media-ui/dev-server run dev",
"watch": "concurrently -k \"yarn watch:module\" \"yarn watch:plugin\"",
"watch:module": "yarn workspace @media-ui/media-module run watch",
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
],
"exclude": [
"node_modules",
]
],
"ts-node": {
"esm": true,
}
}

0 comments on commit 87c1622

Please sign in to comment.