Skip to content

Commit

Permalink
Merge branch 'master' of github.com:wixplosives/codux-core into nadav…
Browse files Browse the repository at this point in the history
…/handle-hash-navigation
  • Loading branch information
nadavov committed Oct 20, 2024
2 parents e8b3997 + 8b9e9c7 commit 65eb07b
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 98 deletions.
162 changes: 81 additions & 81 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@file-services/node": "^9.4.1",
"@file-services/path": "^9.4.1",
"@file-services/resolve": "^9.4.1",
"@playwright/browser-chromium": "^1.48.0",
"@playwright/browser-chromium": "^1.48.1",
"@types/chai": "^4.3.20",
"@types/chai-as-promised": "^7.1.8",
"@types/mocha": "^10.0.9",
Expand All @@ -31,7 +31,7 @@
"chai": "^4.5.0",
"chai-as-promised": "^7.1.2",
"esbuild": "^0.24.0",
"eslint": "^9.12.0",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-no-only-tests": "^3.3.0",
"eslint-plugin-react": "^7.37.1",
Expand All @@ -45,7 +45,7 @@
"rimraf": "^6.0.1",
"sinon": "^19.0.2",
"typescript": "~5.6.3",
"typescript-eslint": "^8.9.0"
"typescript-eslint": "^8.10.0"
},
"license": "MIT",
"private": true
Expand Down
11 changes: 8 additions & 3 deletions packages/app-core/test-kit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,13 @@ export class AppDefDriver<T> {
listener(this.lastManifest!);
}
}
async render({uri = '/'}: {uri?: string} = {}) {
async render({
uri = '/',
testAutoRerenderOnManifestUpdate,
}: { uri?: string; testAutoRerenderOnManifestUpdate?: boolean } = {}) {
const { app } = this.options;
const { fsApi, importModule } = this;

if (!app.callServerMethod) {
throw new Error('app.callServerMethod is not defined');
}
Expand Down Expand Up @@ -171,7 +174,9 @@ export class AppDefDriver<T> {
const manifestListener = () => {
void rerender({uri: lastUri});
};
this.addManifestListener(manifestListener);
if (testAutoRerenderOnManifestUpdate !== false) {
this.addManifestListener(manifestListener);
}
return {
dispose: ()=> {
unmount();
Expand Down
Loading

0 comments on commit 65eb07b

Please sign in to comment.