diff --git a/src/core/index.js b/src/core/index.js index 440d67302..2a3dd8fe5 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -1,11 +1,13 @@ import { Session } from "./session" +import { Cache } from "./cache" import { PageRenderer } from "./drive/page_renderer" import { PageSnapshot } from "./drive/page_snapshot" import { FrameRenderer } from "./frames/frame_renderer" import { FormSubmission } from "./drive/form_submission" const session = new Session() -const { cache, navigator } = session +const cache = new Cache(session) +const { navigator } = session export { navigator, session, cache, PageRenderer, PageSnapshot, FrameRenderer } export { StreamActions } from "./streams/stream_actions" diff --git a/src/index.js b/src/index.js index 07e3e097d..6045469d1 100644 --- a/src/index.js +++ b/src/index.js @@ -10,3 +10,4 @@ Turbo.start() export * from "./core" export * from "./elements" export * from "./http" +export { StreamActions } from "./core/streams/stream_actions" diff --git a/src/tests/unit/export_tests.js b/src/tests/unit/export_tests.js index be46c8160..2ae44f88f 100644 --- a/src/tests/unit/export_tests.js +++ b/src/tests/unit/export_tests.js @@ -1,5 +1,6 @@ import { assert } from "@open-wc/testing" -import * as Turbo from "../../index" +import * as Turbo from "../../" +import { StreamActions } from "../../" test("test Turbo interface", () => { assert.equal(typeof Turbo.start, "function") @@ -16,3 +17,7 @@ test("test Turbo interface", () => { assert.equal(typeof Turbo.navigator, "object") assert.equal(typeof Turbo.session, "object") }) + +test("test StreamActions interface", () => { + assert.equal(typeof StreamActions, "object") +})