Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigatorjs can not be constructed multiple times #19

Open
PaulTondeur opened this issue Sep 17, 2013 · 0 comments
Open

Navigatorjs can not be constructed multiple times #19

PaulTondeur opened this issue Sep 17, 2013 · 0 comments

Comments

@PaulTondeur
Copy link
Member

The following test is currently failing:

    it("can be constructed multiple times", function () {
        navigator.add(responder, states.contact);
        navigator.start(states.contact);

        expect(navigator.getCurrentState().getPath()).toEqual(states.contact.getPath());

        var otherNavigator = new navigatorjs.Navigator();
        otherNavigator.start();

        expect(navigator.getCurrentState().getPath()).toEqual(states.contact.getPath());
        expect(otherNavigator.getCurrentState().getPath()).toEqual("/");
    });

The navigator should be able to be instantiated multiple times, so in theory multiple components on a webpage could make use of the navigator.

With the current setup this won't be possible. The project should be refactored to make this possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant