How to use the single-spa.MOUNTED function in single-spa

To help you get started, we’ve selected a few single-spa examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CanopyTax / single-spa / spec / parcels / mount-root-parcel.spec.js View on Github external
.then(() => {
        expect(parcel.getStatus()).toBe(singleSpa.MOUNTED);
      })
      .then(() => new Promise((resolve, reject) => {
github CanopyTax / single-spa / spec / apps / uses-loader / uses-loader.spec.js View on Github external
.then(() => {
        expect(myApp.bootstrapWasCalled()).toBe(true);
        expect(myApp.mountWasCalled()).toBe(true);
        expect(myApp.unmountWasCalled()).toBe(false);
        expect(singleSpa.getAppStatus('./uses-loader.app.js')).toEqual(singleSpa.MOUNTED);
      })
  });
github CanopyTax / single-spa / spec / parcels / app-mounts-parcel.spec.js View on Github external
.then(() => {
                expect(parcel.getStatus()).toBe(singleSpa.MOUNTED);
                expect(unmountPromiseHasResolved).toBe(false);
                expect(parcelConfig.bootstrapCalls).toBe(1);
                expect(parcelConfig.mountCalls).toBe(1);
                expect(parcelConfig.unmountCalls).toBe(0);

                shouldAppBeMounted = false;
                return singleSpa.triggerAppChange();
              })
          })
github CanopyTax / single-spa / spec / parcels / app-mounts-parcel.spec.js View on Github external
.then(() => {
        expect(parcel.getStatus()).toBe(singleSpa.MOUNTED);
        shouldAppBeMounted = false;
        return singleSpa.triggerAppChange();
      })
      .then(() => {
github CanopyTax / single-spa / spec / parcels / mount-root-parcel.spec.js View on Github external
      .then(() => expect(parcel.getStatus()).toBe(singleSpa.MOUNTED))
      .then(() => parcel.unmount())
github CanopyTax / single-spa / spec / apps / bootstrap-times-out / bootstrap-times-out.spec.js View on Github external
.then(() => {
        expect(myApp.wasBootstrapped()).toEqual(true);
        expect(myApp.wasMounted()).toEqual(true);
        expect(singleSpa.getMountedApps()).toEqual(['./bootstrap-times-out.app.js']);
        expect(singleSpa.getAppStatus('./bootstrap-times-out.app.js')).toEqual(singleSpa.MOUNTED);
        expect(errs.length).toBe(0);
      })
  });