build: fix build and add examples
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { Provider } from 'injection-js';
|
||||
import type { Provider } from '@outposts/injection-js';
|
||||
import { JSDOM } from 'jsdom';
|
||||
import { AbstractRouter, type Navigation, type UrlTree } from 'oidc-client-rx';
|
||||
|
||||
@@ -8,26 +8,15 @@ export class MockRouter extends AbstractRouter {
|
||||
});
|
||||
|
||||
navigation: Navigation = {
|
||||
id: 1,
|
||||
extras: {},
|
||||
initialUrl: this.parseUrl(this.dom.window.location.href),
|
||||
extractedUrl: this.parseUrl(this.dom.window.location.href),
|
||||
trigger: 'imperative',
|
||||
previousNavigation: null,
|
||||
};
|
||||
|
||||
navigateByUrl(url: string): void {
|
||||
const prevNavigation = this.navigation;
|
||||
this.dom.reconfigure({
|
||||
url: new URL(url, this.dom.window.location.href).href,
|
||||
});
|
||||
this.navigation = {
|
||||
id: prevNavigation.id + 1,
|
||||
extras: {},
|
||||
initialUrl: prevNavigation.initialUrl,
|
||||
extractedUrl: this.parseUrl(this.dom.window.location.href),
|
||||
trigger: prevNavigation.trigger,
|
||||
previousNavigation: prevNavigation,
|
||||
};
|
||||
}
|
||||
getCurrentNavigation(): Navigation {
|
||||
|
||||
Reference in New Issue
Block a user