-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compatibility fixes for deno support
local-testing still has issues with node:child_process support
- Loading branch information
Showing
18 changed files
with
132 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"imports": { | ||
"@/": "./src/" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { BrowserStack } from "@/index.ts"; | ||
import { load } from "https://deno.land/std@0.213.0/dotenv/mod.ts"; | ||
|
||
const env = await load(); | ||
|
||
const options = { | ||
username: env.VITE_BROWSERSTACK_USERNAME, | ||
key: env.VITE_BROWSERSTACK_KEY, | ||
}; | ||
|
||
// BrowserStack JavaScript Testing API | ||
const jsTestingClient = new BrowserStack.Client(options); | ||
|
||
// BrowserStack Automate API | ||
const automateClient = new BrowserStack.AutomateClient(options); | ||
|
||
// BrowserStack App Automate API | ||
const appAutomateClient = new BrowserStack.AppAutomateClient(options); | ||
|
||
// BrowserStack Screenshots API | ||
const screenshotsClient = new BrowserStack.ScreenshotsClient(options); | ||
|
||
// BrowserStack Local Testing API | ||
const localTestingClient = new BrowserStack.LocalTestingClient(options); | ||
|
||
console.log("jsTestingClient.getBrowsers()", await jsTestingClient.getBrowsers()); | ||
console.log("automateClient.getBrowsers()", await automateClient.getBrowsers()); | ||
console.log("appAutomateClient.getDevices()", await appAutomateClient.getDevices()); | ||
console.log("screenshotsClient.getBrowsers()", await screenshotsClient.getBrowsers()); | ||
console.log("localTestingClient.getBinaryInstances()", await localTestingClient.getBinaryInstances()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// for compatibility with nodejs and deno | ||
|
||
interface Dict<T> { | ||
[key: string]: T | undefined; | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
const proc = globalThis.process ?? { env: {}, versions: {} }; | ||
|
||
export const env: Dict<string> = { ...proc?.env }; | ||
|
||
export const versions: Dict<string> = { | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
node: "unknown", | ||
...proc?.versions, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters