Skip to content

Add helper function to preconfigure project for web-sys #455

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

Merged
merged 1 commit into from
Jul 11, 2018
Merged
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
6 changes: 2 additions & 4 deletions crates/web-sys/tests/all/event.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use super::project;
use super::websys_project;

#[test]
fn event() {
project()
.add_local_dependency("web-sys", env!("CARGO_MANIFEST_DIR"))
.headless(true)
websys_project()
.file(
"src/lib.rs",
r#"
Expand Down
9 changes: 8 additions & 1 deletion crates/web-sys/tests/all/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
extern crate wasm_bindgen_test_project_builder as project_builder;
use project_builder::project;
use project_builder::{project, Project};

mod event;
mod response;

fn websys_project() -> Project {
project()
.add_local_dependency("web-sys", env!("CARGO_MANIFEST_DIR"))
.headless(true)
.clone()
}
6 changes: 2 additions & 4 deletions crates/web-sys/tests/all/response.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use super::project;
use super::websys_project;

#[test]
fn response() {
project()
.add_local_dependency("web-sys", env!("CARGO_MANIFEST_DIR"))
.headless(true)
websys_project()
.file(
"src/lib.rs",
r#"
Expand Down