history.go(1, false)
expect(spy).not.toHaveBeenCalled()
})
+
+ it('handles a non-empty base', () => {
+ expect(createMemoryHistory('/foo/').base).toBe('/foo')
+ expect(createMemoryHistory('/foo').base).toBe('/foo')
+ })
})
NavigationType,
NavigationDirection,
NavigationInformation,
+ normalizeBase,
createHref,
HistoryLocation,
} from './common'
let listeners: NavigationCallback[] = []
let queue: HistoryLocation[] = [START]
let position: number = 0
+ base = normalizeBase(base)
function setLocation(location: HistoryLocation) {
position++