class TestNavigationContext
A class that encapsulates the current navigation location, simulating browser-like behavior.
class TestNavigationContext extends NavigationContext;
Instance members
isTestNavigationContext readonly
Flag for duck typing.navigateAsync()
Navigates to the provided target.userNavigation()
Sets the provided location immediately, simulating external navigation.userBack()
Removes the last path in navigation history immediately, simulating external ‘back’ navigation.clear()
Clears navigation history and restores the initial location.getHistory()
Returns a list of all locations currently in navigation history.
Inherited members
path
The current navigation path, read-only.set()
Sets the current navigation path.resolve()
Resolves a relative path against the current navigation path.emit()
Emits an event, immediately calling all event handlers.emitChange()
Emits a change event.listen()
Adds a handler for all events emitted by this object.listenOnce()
Returns a promise for a single event with the provided name.listenAsync()
Adds a handler for all events emitted by this object, and returns an async iterable.observe()
Observes a property, a bound property from an attached parent, or an observable object.observeAsync()
Observes one or more targets asynchronously, batching or debouncing/throttling updates.attach() protected
Attaches the specified observable object to this object.isUnlinked()
Returns true if the object has been unlinked.unlink()
Unlinks this observable object.beforeUnlink() protected
A method that’s called immediately before unlinking an object, can be overridden.
