"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graph_1 = require("./graph");
const environment_1 = require("./models/environment");
test('printHelloGraph should print "Hello, Graph!"', async () => {
    // Mock the console.log function
    const consoleLogMock = jest.spyOn(console, 'log').mockImplementation();
    const environment = { environmentType: environment_1.EnvironmentType.Dev, config: {} };
    const graph = new graph_1.Graph(environment);
    await graph.printHelloGraph();
    expect(consoleLogMock).toHaveBeenCalledWith('Hello, Graph!');
    await graph.freeGraphState();
});
test('getGraphConfig should return the graph config', async () => {
    const environment = { environmentType: environment_1.EnvironmentType.Dev, config: {} };
    const graph = new graph_1.Graph(environment);
    const config = await graph.getGraphConfig(environment);
    expect(config).toBeDefined();
    expect(config.sdkMaxUsersGraphSize).toEqual(1000);
    await graph.freeGraphState();
});
test('getGraphConfig with Mainnet environment should return the graph config', async () => {
    const environment = { environmentType: environment_1.EnvironmentType.Mainnet };
    const graph = new graph_1.Graph(environment);
    const config = await graph.getGraphConfig(environment);
    expect(config).toBeDefined();
    expect(config.sdkMaxUsersGraphSize).toEqual(1000);
    await graph.freeGraphState();
});
test('getGraphConfig with Rococo environment should return the graph config', async () => {
    const environment = { environmentType: environment_1.EnvironmentType.Rococo };
    const graph = new graph_1.Graph(environment);
    const config = await graph.getGraphConfig(environment);
    expect(config).toBeDefined();
    expect(config.sdkMaxUsersGraphSize).toEqual(1000);
    await graph.freeGraphState();
});
test('initialize graph with low capacity of 100 should return the same capacity', async () => {
    const environment = { environmentType: environment_1.EnvironmentType.Dev, config: {} };
    const graph = new graph_1.Graph(environment, 100);
    const handle = graph.getGraphHandle();
    expect(handle).toBeDefined();
    const capacity = await graph.getGraphCapacity();
    expect(capacity).toEqual(100);
    await graph.freeGraphState();
});
//# sourceMappingURL=graph.test.js.map