Skip to content

Commit

Permalink
Switch N-API tests to cargo-cp-artifact from neon-build
Browse files Browse the repository at this point in the history
  • Loading branch information
kjvalencik committed Feb 16, 2021
1 parent eabe090 commit a44a45a
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 23 deletions.
5 changes: 0 additions & 5 deletions test/electron/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@ version = "0.1.0"
edition = "2018"
authors = ["The Neon Community"]
license = "MIT/Apache-2.0"
build = "build.rs"

[lib]
name = "electron_tests"
crate-type = ["cdylib"]

[build-dependencies]
neon-build = {version = "*", path = "../../crates/neon-build"}

[dependencies.neon]
version = "*"
path = "../.."
Expand Down
3 changes: 0 additions & 3 deletions test/electron/build.rs

This file was deleted.

6 changes: 6 additions & 0 deletions test/electron/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion test/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
"author": "The Neon Community",
"license": "MIT",
"scripts": {
"install": "cargo build -p electron-tests --release",
"install": "cargo-cp-artifact $npm_package_name=cdylib=index.node -- cargo build --message-format=json-render-diagnostics",
"start": "electron .",
"test": "node test"
},
"repository": "https://github.com/electron/electron-quick-start",
"devDependencies": {
"cargo-cp-artifact": "^0.0.1",
"electron": "^11.0.3",
"spectron": "^13.0.0"
}
Expand Down
7 changes: 1 addition & 6 deletions test/napi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
[package]
name = "napi"
name = "napi-tests"
version = "0.1.0"
authors = ["The Neon Community <david.herman@gmail.com>"]
license = "MIT"
build = "build.rs"
exclude = ["artifacts.json", "index.node"]
edition = "2018"

[lib]
name = "napi"
crate-type = ["cdylib"]

[build-dependencies]
neon-build = {version = "*", path = "../../crates/neon-build"}

[dependencies.neon]
version = "*"
path = "../.."
Expand Down
7 changes: 0 additions & 7 deletions test/napi/build.rs

This file was deleted.

6 changes: 6 additions & 0 deletions test/napi/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion test/napi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"author": "The Neon Community",
"license": "MIT",
"scripts": {
"install": "cargo build -p napi --release",
"install": "cargo-cp-artifact $npm_package_name=cdylib=index.node -- cargo build --message-format=json-render-diagnostics",
"test": "mocha --expose-gc --timeout 5000 --recursive lib"
},
"devDependencies": {
"cargo-cp-artifact": "^0.0.1",
"chai": "^4.2.0",
"mocha": "^8.1.0"
}
Expand Down

0 comments on commit a44a45a

Please sign in to comment.