@crabnebula/test-runner-backend 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +29 -0
- package/build.rs +1 -1
- package/package.json +5 -5
- package/src/lib.rs +3 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## \[0.1.0]
|
|
4
|
+
|
|
5
|
+
- [`bc81b34`](https://github.com/crabnebula-dev/webdriver/commit/bc81b34090682a3c11556267ac469881a576f1bc) ([#33](https://github.com/crabnebula-dev/webdriver/pull/33) by [@enes-crabnebula](https://github.com/crabnebula-dev/webdriver/../../enes-crabnebula)) - Fix tauri updater plugin crash on macOS.
|
|
6
|
+
- Fix crash on automation plugin crash on init.
|
|
7
|
+
- [`46b3a45`](https://github.com/crabnebula-dev/webdriver/commit/46b3a45f0321b88eead1242e70336eec1cffda7b) ([#28](https://github.com/crabnebula-dev/webdriver/pull/28) by [@lucasfernog-crabnebula](https://github.com/crabnebula-dev/webdriver/../../lucasfernog-crabnebula)) Add documentation.
|
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# CrabNebula Webdriver for Tauri Test Runner
|
|
2
|
+
|
|
3
|
+
This package provides a test runner API service for the CrabNebula Webdriver for Tauri.
|
|
4
|
+
|
|
5
|
+
It lets you run integration tests locally leveraging CrabNebula's Webdriver.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Install with your favorite package manager:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install --save-dev @crabnebula/test-runner-backend
|
|
13
|
+
yarn install -D @crabnebula/test-runner-backend
|
|
14
|
+
pnpm install -D @crabnebula/test-runner-backend
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Then you can execute the `test-runner-backend` binary:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm run test-runner-backend # requires a `{ "test-runner-backend": "test-runner-backend" }` script in package.json
|
|
21
|
+
yarn test-runner-backend
|
|
22
|
+
pnpm test-runner-backend
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
To actually run integration tests leverating this backend, you should use the [@crabnebula/tauri-driver](https://www.npmjs.com/package/@crabnebula/tauri-driver) package, which works cross platform and can communicate with this test runner seamlessly.
|
|
28
|
+
|
|
29
|
+
See the [@crabnebula/tauri-driver documentation](https://www.npmjs.com/package/@crabnebula/tauri-driver) for more information.
|
package/build.rs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crabnebula/test-runner-backend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"bin": {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"version": "napi version"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"@crabnebula/test-runner-backend-win32-x64-msvc": "0.
|
|
35
|
-
"@crabnebula/test-runner-backend-darwin-x64": "0.
|
|
36
|
-
"@crabnebula/test-runner-backend-linux-x64-gnu": "0.
|
|
37
|
-
"@crabnebula/test-runner-backend-darwin-arm64": "0.
|
|
34
|
+
"@crabnebula/test-runner-backend-win32-x64-msvc": "0.1.0",
|
|
35
|
+
"@crabnebula/test-runner-backend-darwin-x64": "0.1.0",
|
|
36
|
+
"@crabnebula/test-runner-backend-linux-x64-gnu": "0.1.0",
|
|
37
|
+
"@crabnebula/test-runner-backend-darwin-arm64": "0.1.0"
|
|
38
38
|
}
|
|
39
39
|
}
|
package/src/lib.rs
CHANGED
|
@@ -2,7 +2,7 @@ use napi::Result;
|
|
|
2
2
|
|
|
3
3
|
#[napi_derive::napi]
|
|
4
4
|
pub async fn run(args: Vec<String>, bin_name: Option<String>) -> Result<()> {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
test_runner_backend::try_run(args, bin_name)
|
|
6
|
+
.await
|
|
7
|
+
.map_err(|e| napi::Error::new(napi::Status::GenericFailure, e.to_string()))
|
|
8
8
|
}
|