import { __awaiter, __generator } from "tslib";
import { AnalyticsNode } from '../node';
var writeKey = 'AMXNlZu1NRZDf1dYHkkAQKS4fBaggZX5';
describe('Initialization', function () {
    it('loads analytics-node-next plugin', function () { return __awaiter(void 0, void 0, void 0, function () {
        var analytics, ajsNodeXt;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0: return [4 /*yield*/, AnalyticsNode.load({
                        writeKey: writeKey,
                    })];
                case 1:
                    analytics = (_a.sent())[0];
                    expect(analytics.queue.plugins.length).toBe(2);
                    ajsNodeXt = analytics.queue.plugins.find(function (xt) { return xt.name === 'analytics-node-next'; });
                    expect(ajsNodeXt).toBeDefined();
                    expect(ajsNodeXt === null || ajsNodeXt === void 0 ? void 0 : ajsNodeXt.isLoaded()).toBeTruthy();
                    return [2 /*return*/];
            }
        });
    }); });
});
//# sourceMappingURL=node-integration.test.js.map