Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: skip JS interoperability tests to get branches to build #143

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ jobs:
cargo check --no-default-features --features async-std
cargo check --no-default-features --features async-std,sparse
cargo check --no-default-features --features async-std,sparse,cache
cargo test --no-default-features --features js_interop_tests,tokio
cargo test --no-default-features --features js_interop_tests,tokio,sparse
cargo test --no-default-features --features js_interop_tests,tokio,sparse,cache
cargo test --no-default-features --features js_interop_tests,async-std
cargo test --no-default-features --features js_interop_tests,async-std,sparse
cargo test --no-default-features --features js_interop_tests,async-std,sparse,cache
cargo test --no-default-features --features tokio
cargo test --no-default-features --features tokio,sparse
cargo test --no-default-features --features tokio,sparse,cache
cargo test --no-default-features --features async-std
cargo test --no-default-features --features async-std,sparse
cargo test --no-default-features --features async-std,sparse,cache
cargo test --benches --no-default-features --features tokio
cargo test --benches --no-default-features --features async-std

Expand Down Expand Up @@ -88,12 +88,12 @@ jobs:
cargo check --no-default-features --features async-std
cargo check --no-default-features --features async-std,sparse
cargo check --no-default-features --features async-std,sparse,cache
cargo test --no-default-features --features js_interop_tests,tokio
cargo test --no-default-features --features js_interop_tests,tokio,sparse
cargo test --no-default-features --features js_interop_tests,tokio,sparse,cache
cargo test --no-default-features --features js_interop_tests,async-std
cargo test --no-default-features --features js_interop_tests,async-std,sparse
cargo test --no-default-features --features js_interop_tests,async-std,sparse,cache
cargo test --no-default-features --features tokio
cargo test --no-default-features --features tokio,sparse
cargo test --no-default-features --features tokio,sparse,cache
cargo test --no-default-features --features async-std
cargo test --no-default-features --features async-std,sparse
cargo test --no-default-features --features async-std,sparse,cache
cargo test --benches --no-default-features --features tokio
cargo test --benches --no-default-features --features async-std

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ To test interoperability with Javascript, enable the `js_interop_tests` feature:
cargo test --features js_interop_tests
```

NB: Javascript interoperability has unfortunately been broken by latest Javascript
upstream changes and the tests now fail because of that.

Run benches with:

```bash
Expand Down
18 changes: 18 additions & 0 deletions tests/js_interop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,24 @@ async fn js_interop_rs_first() -> Result<()> {
Ok(())
}

#[test(async_test)]
async fn hypercore_disk_format() -> Result<()> {
init();
let work_dir = prepare_test_set(TEST_SET_RS_FIRST);
assert_eq!(create_hypercore_hash(&work_dir), step_0_hash());
step_1_create(&work_dir).await?;
assert_eq!(create_hypercore_hash(&work_dir), step_1_hash());
step_2_append_hello_world(&work_dir).await?;
assert_eq!(create_hypercore_hash(&work_dir), step_2_hash());
step_3_read_and_append_unflushed(&work_dir).await?;
assert_eq!(create_hypercore_hash(&work_dir), step_3_hash());
step_4_append_with_flush(&work_dir).await?;
assert_eq!(create_hypercore_hash(&work_dir), step_4_hash());
step_5_clear_some(&work_dir).await?;
assert_eq!(create_hypercore_hash(&work_dir), step_5_hash());
Ok(())
}

async fn step_1_create(work_dir: &str) -> Result<()> {
create_hypercore(work_dir).await?;
Ok(())
Expand Down
Loading