Skip to content

Commit

Permalink
chore(innate): add [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mendez committed Oct 9, 2023
1 parent f7e9c09 commit 79cfddd
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 42 deletions.
2 changes: 1 addition & 1 deletion kayle/tests/innate-playwright.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test("kayle_innate, fast_htmlcs, fast_axecore, and ace audit drakeMock profiling
""
);
const startTime = performance.now();
const audit = await _audit_not_ready(mock, css);
const audit = await _audit_not_ready(mock, css, false);
const nextTime = performance.now() - startTime;
console.log("Rust/WASM TIME ", nextTime);

Expand Down
2 changes: 1 addition & 1 deletion kayle/tests/innate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { _audit_not_ready } from "kayle_innate";
</form>`);

const startTime = performance.now();
const audit = await _audit_not_ready(mock, css);
const audit = await _audit_not_ready(mock, css, false);
const nextTime = performance.now() - startTime;
console.log("Rust/WASM TIME ", nextTime);

Expand Down
92 changes: 56 additions & 36 deletions kayle_innate/Cargo.lock

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

2 changes: 1 addition & 1 deletion kayle_innate/kayle_innate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ego-tree = { workspace = true }
markup5ever = "0.11.0"
cssparser = { workspace = true }
slotmap = "1.0.6"
accessibility-rs = "0.0.4"
accessibility-rs = "0.0.5"

[dev-dependencies]
wasm-bindgen-test = "0.3.37"
Expand Down
4 changes: 2 additions & 2 deletions kayle_innate/kayle_innate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ macro_rules! console_log {
#[wasm_bindgen]
#[cfg(feature = "accessibility")]
/// audit a web page passing the html and css rules.
pub fn _audit_not_ready(html: &str, css_rules: &str) -> Result<JsValue, JsValue> {
let audit = accessibility_rs::audit(&html, &css_rules);
pub fn _audit_not_ready(html: &str, css_rules: &str, clip: bool) -> Result<JsValue, JsValue> {
let audit = accessibility_rs::audit(&html, &css_rules, clip);

// todo: map to JsValues instead of serde
Ok(serde_wasm_bindgen::to_value(&audit)?)
Expand Down
2 changes: 1 addition & 1 deletion kayle_innate/kayle_innate/tests/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ fn _get_document_links() {
#[wasm_bindgen_test]
#[cfg(feature = "accessibility")]
fn _audit() {
let _ = kayle_innate::_audit_not_ready(mock::MOCK_WEBSITE_HTML, &mock::MOCK_CSS_RULES);
let _ = kayle_innate::_audit_not_ready(mock::MOCK_WEBSITE_HTML, &mock::MOCK_CSS_RULES, false);
}

0 comments on commit 79cfddd

Please sign in to comment.