"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var src_1 = require("../src"); describe("Module", function () { var plexOauth = new src_1.PlexOauth({ clientIdentifier: "dhjoasoidjapoiwdmamlw", device: "TEST DEVICE", product: "TEST DEVICE", version: "1", forwardUrl: "https://localhost/" }); it("loads and initializes", function () { expect(plexOauth).toBeDefined(); }); it("returns a hosted ui link and poll for an auth token", function () { plexOauth.requestHostedLoginURL().then(function (response) { var hostedUiLink = response[0], pinId = response[1]; expect(hostedUiLink).toBeDefined(); expect(hostedUiLink).toContain("https://app.plex.tv/auth"); expect(hostedUiLink).not.toContain("undefined"); expect(hostedUiLink).not.toContain("null"); plexOauth.checkForAuthToken(pinId, 1000, 1).then(function (pinResponse) { var authToken = pinResponse; expect(authToken).toBeNull(); }); }); }); }); //# sourceMappingURL=index.spec.js.map