<commit_before>import "reflect-metadata";
import {Connection} from "../../../../../src/connection/Connection";
import {closeTestingConnections, createTestingConnections, reloadTestingDatabases} from "../../../../utils/test-utils";
import {User} from "./entity/User";
import {Profile} from "./entity/Profile";
import {Editor} from "./entity/Editor";
import {Post} from "./entity/Post";
import {Category} from "./entity/Category";

describe.only("relations > eager relations > basic", () => {

    let connections: Connection[];
    before(async () => connections = await createTestingConnections({
        entities: [__dirname + "/entity/*{.js,.ts}"],
        dropSchema: true,
    }));
    beforeEach(() => reloadTestingDatabases(connections));
    after(() => closeTestingConnections(connections));

    async function prepareData(connection: Connection) {
        const profile = new Profile();
        profile.about = "I cut trees!";
        await connection.manager.save(profile);

        const user = new User();
        user.firstName = "Timber";
        user.lastName = "Saw";
        user.profile = profile;
        await connection.manager.save(user);<commit_msg>removed only<commit_after>import "reflect-metadata";
import {Connection} from "../../../../../src/connection/Connection";
import {closeTestingConnections, createTestingConnections, reloadTestingDatabases} from "../../../../utils/test-utils";
import {User} from "./entity/User";
import {Profile} from "./entity/Profile";
import {Editor} from "./entity/Editor";
import {Post} from "./entity/Post";
import {Category} from "./entity/Category";

describe("relations > eager relations > basic", () => {

    let connections: Connection[];
    before(async () => connections = await createTestingConnections({
        entities: [__dirname + "/entity/*{.js,.ts}"],
        dropSchema: true,
    }));
    beforeEach(() => reloadTestingDatabases(connections));
    after(() => closeTestingConnections(connections));

    async function prepareData(connection: Connection) {
        const profile = new Profile();
        profile.about = "I cut trees!";
        await connection.manager.save(profile);

        const user = new User();
        user.firstName = "Timber";
        user.lastName = "Saw";
        user.profile = profile;
        await connection.manager.save(user);
{'fraction_non_alphanumeric': 0.16538461538461538, 'fraction_numerical': 0.0, 'mean_word_length': 3.425330812854442, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '3407544', 'n_tokens_mistral': 606, 'n_tokens_neox': 600, 'n_words': 156}