<commit_before>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");
  });
});
<commit_msg>fix unit test<commit_after>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 () => {
    const route = await router.instance.resolve("/auth/login");
    assert(route);
    assert(route.component)
    assert.equal(route.title, "Login");
  });
  it("/app/profile not authenticated", async () => {
    expect(router.instance.resolve("/profile")).to.be.rejectedWith(Error);
  });
});

{'fraction_non_alphanumeric': 0.18357487922705315, 'fraction_numerical': 0.0, 'mean_word_length': 4.215827338129497, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2751115', 'n_tokens_mistral': 457, 'n_tokens_neox': 451, 'n_words': 95}