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

ci: Enable test with wasm-bindgen-test and wasm-pack #20

Merged
merged 1 commit into from
Jan 7, 2019

Conversation

naufraghi
Copy link
Contributor

- add firefox as addon
- cache cargo (allow failure on cargo install)
- disable windows because of https://travis-ci.org/naufraghi/seed/jobs/475998812#L630
@naufraghi
Copy link
Contributor Author

naufraghi commented Jan 7, 2019

There is an issue about something very similar, the fix should be already merged (rustwasm/wasm-pack#380) but will be released in 0.6.0 (we are using the current latest 0.5.1)

@naufraghi
Copy link
Contributor Author

In the next MR I have added the badge in the readme, but @David-OConnor need to enable travis for this repo (every time I forget this step can be done form https://travis-ci.org/account/repositories and not from github)

@David-OConnor David-OConnor merged commit d98c94c into seed-rs:master Jan 7, 2019
@David-OConnor
Copy link
Member

David-OConnor commented Jan 7, 2019

Added Travis and the readme badge. I've been having trouble with tests due to web_sys funcs not working in normal tests; looks like #[wasm_bindgen_test] attempts to sort this out.

@naufraghi naufraghi deleted the travis-test branch January 8, 2019 05:54
@naufraghi
Copy link
Contributor Author

Oh, yes, I forgot to link the docs.
Beside that, this diff fixes the error on travis:

diff --git a/src/dom_types.rs b/src/dom_types.rs
index 63fa2a3..51b0869 100644
--- a/src/dom_types.rs
+++ b/src/dom_types.rs
@@ -970,10 +970,10 @@ pub mod tests {
     // todo 'cannot call wasm-bindgen imported functions on non-wasm targets' error
     #[wasm_bindgen_test]
     pub fn single() {
-        let expected = "<div>\ntest\n</div>";
+        let expected = "<div>test</div>";
 
         let mut el: El<Msg> = div![ "test" ];
         crate::vdom::setup_els(&crate::util::document(), &mut el, 0, 0);
-        assert_eq!(expected, el.el_ws.unwrap().inner_html());
+        assert_eq!(expected, el.el_ws.unwrap().outer_html());
     }
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants