Skip to content

Instantly share code, notes, and snippets.

@cowboyd
Created November 17, 2023 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cowboyd/c5735b5f80caf2e745dd93ee78cc48b7 to your computer and use it in GitHub Desktop.
Save cowboyd/c5735b5f80caf2e745dd93ee78cc48b7 to your computer and use it in GitHub Desktop.
A trivial test case launching the astral browser
import { describe, it } from "https://deno.land/std@0.206.0/testing/bdd.ts"
import { launch } from "https://deno.land/x/astral@0.3.1/mod.ts";
describe("browser", () => {
it("launches, sleeps, and closes", async () => {
let browser = await launch();
await new Promise((resolve) => setTimeout(resolve, 2000));
browser.close();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment