import chai from "chai";
import chaiAsPromised from "chai-as-promised";
import UserApp from "../UserApp";

chai.use(chaiAsPromised);
const { expect, assert } = chai;

describe("Router", async function() {
  const { router, context } = await UserApp();
  it("/login", async () => {
    // console.log("CONTEXT ", context);
    const route = await router.instance.resolve("/user/auth/login");
    assert(route);
    assert.equal(route.title, "Login");
  });
  it("/app/profile not authenticated", async () => {
    expect(router.instance.resolve("/profile")).to.be.rejectedWith(Error);
  });
  it.skip("/app/profile authenticated", async () => {
    context.parts.auth.stores().auth.authenticated = true;
    const route = await router.instance.resolve("/profile");
    assert.equal(route.title, "My Profile");
  });
});

@@ -278,49 +278,8 @@
 %3E %7B%0A
-    // console.log(%22CONTEXT %22, context);%0A
     
@@ -328,13 +328,8 @@
 e(%22/
-user/
 auth
@@ -357,16 +357,44 @@
 route);%0A
+    assert(route.component)%0A
     asse
@@ -569,233 +569,8 @@
 %7D);%0A
-  it.skip(%22/app/profile authenticated%22, async () =%3E %7B%0A    context.parts.auth.stores().auth.authenticated = true;%0A    const route = await router.instance.resolve(%22/profile%22);%0A    assert.equal(route.title, %22My Profile%22);%0A  %7D);%0A
 %7D);%0A

fix unit test