Skip to content

Commit

Permalink
re-enable a bunch of snapshot tests
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Dec 12, 2024
1 parent 7752ce3 commit d177d80
Show file tree
Hide file tree
Showing 24 changed files with 1,781,753 additions and 1,603,006 deletions.
42 changes: 21 additions & 21 deletions crates/hdx_ast/tests/basic_snapshots.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// mod helpers;
//
// #[test]
// fn basic_media() {
// assert_snap_ast!("../../tasks/coverage/basic/media.css");
// }
//
// #[test]
// fn basic_nth() {
// assert_snap_ast!("../../tasks/coverage/basic/nth.css");
// }
//
// #[test]
// fn basic_rule() {
// assert_snap_ast!("../../tasks/coverage/basic/rule.css");
// }
//
// #[test]
// fn basic_vars() {
// assert_snap_ast!("../../tasks/coverage/basic/vars.css");
// }
mod helpers;

#[test]
fn basic_media() {
assert_snap_ast!("../../tasks/coverage/basic/media.css");
}

#[test]
fn basic_nth() {
assert_snap_ast!("../../tasks/coverage/basic/nth.css");
}

#[test]
fn basic_rule() {
assert_snap_ast!("../../tasks/coverage/basic/rule.css");
}

#[test]
fn basic_vars() {
assert_snap_ast!("../../tasks/coverage/basic/vars.css");
}
108 changes: 54 additions & 54 deletions crates/hdx_ast/tests/popular_snapshots.rs
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
mod helpers;

// #[test]
// fn popular_960() {
// assert_snap_ast!("../../tasks/coverage/popular/960.css");
// }
//
// #[test]
// fn popular_animate() {
// assert_snap_ast!("../../tasks/coverage/popular/animate.4.1.1.css");
// }
//
// #[test]
// fn popular_blueprint() {
// assert_snap_ast!("../../tasks/coverage/popular/blueprint.1.0.1.css");
// }
//
// #[test]
// fn popular_bootstrap() {
// assert_snap_ast!("../../tasks/coverage/popular/bootstrap.5.3.0.css");
// }
//
// #[test]
// fn popular_foundation() {
// assert_snap_ast!("../../tasks/coverage/popular/foundation.6.7.5.css");
// }
//
// #[test]
// fn popular_inuitcss() {
// assert_snap_ast!("../../tasks/coverage/popular/inuitcss.6.0.0.css");
// }
//
// #[test]
// fn popular_mini() {
// assert_snap_ast!("../../tasks/coverage/popular/mini.css.3.0.1.css");
// }
//
// #[test]
// fn popular_open_props() {
// assert_snap_ast!("../../tasks/coverage/popular/open-props.1.5.10.min.css");
// }
//
// #[test]
// fn popular_primer() {
// assert_snap_ast!("../../tasks/coverage/popular/primer.20.8.3.css");
// }
//
// #[test]
// fn popular_pure() {
// assert_snap_ast!("../../tasks/coverage/popular/pure.2.0.3.css");
// }
//
// #[test]
// fn popular_reset() {
// assert_snap_ast!("../../tasks/coverage/popular/reset.2.0.css");
// }
#[test]
fn popular_960() {
assert_snap_ast!("../../tasks/coverage/popular/960.css");
}

#[test]
fn popular_animate() {
assert_snap_ast!("../../tasks/coverage/popular/animate.4.1.1.css");
}

#[test]
fn popular_blueprint() {
assert_snap_ast!("../../tasks/coverage/popular/blueprint.1.0.1.css");
}

#[test]
fn popular_bootstrap() {
assert_snap_ast!("../../tasks/coverage/popular/bootstrap.5.3.0.css");
}

#[test]
fn popular_foundation() {
assert_snap_ast!("../../tasks/coverage/popular/foundation.6.7.5.css");
}

#[test]
fn popular_inuitcss() {
assert_snap_ast!("../../tasks/coverage/popular/inuitcss.6.0.0.css");
}

#[test]
fn popular_mini() {
assert_snap_ast!("../../tasks/coverage/popular/mini.css.3.0.1.css");
}

#[test]
fn popular_open_props() {
assert_snap_ast!("../../tasks/coverage/popular/open-props.1.5.10.min.css");
}

#[test]
fn popular_primer() {
assert_snap_ast!("../../tasks/coverage/popular/primer.21.5.1.css");
}

#[test]
fn popular_pure() {
assert_snap_ast!("../../tasks/coverage/popular/pure.2.0.3.css");
}

#[test]
fn popular_reset() {
assert_snap_ast!("../../tasks/coverage/popular/reset.2.0.css");
}
18 changes: 6 additions & 12 deletions crates/hdx_ast/tests/postcss_snapshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,13 @@ fn postcss_empty() {
#[test]
#[cfg(feature = "serde")]
fn postcss_escape() {
// FIXME: this fails we need CI green for now.
// assert_snap_ast!("../../tasks/coverage/postcss-parser-tests/cases/escape.css");
assert_snap_ast!("../../tasks/coverage/postcss-parser-tests/cases/escape.css");
}

#[test]
#[cfg(feature = "serde")]
fn postcss_extends() {
// FIXME: this fails we need CI green for now.
// assert_snap_ast!("../../tasks/coverage/postcss-parser-tests/cases/extends.css");
assert_snap_ast!("../../tasks/coverage/postcss-parser-tests/cases/extends.css");
}

#[test]
Expand All @@ -114,15 +112,13 @@ fn postcss_ie_prodid() {
#[test]
#[cfg(feature = "serde")]
fn postcss_important() {
// FIXME: this fails we need CI green for now.
// assert_snap_ast!("../../tasks/coverage/postcss-parser-tests/cases/important.css");
assert_snap_ast!("../../tasks/coverage/postcss-parser-tests/cases/important.css");
}

#[test]
#[cfg(feature = "serde")]
fn postcss_inside() {
// FIXME: this fails we need CI green for now.
// assert_snap_ast!("../../tasks/coverage/postcss-parser-tests/cases/inside.css");
assert_snap_ast!("../../tasks/coverage/postcss-parser-tests/cases/inside.css");
}

#[test]
Expand All @@ -134,8 +130,7 @@ fn postcss_no_selector() {
#[test]
#[cfg(feature = "serde")]
fn postcss_prop() {
// FIXME: this fails we need CI green for now.
// assert_snap_ast!("../../tasks/coverage/postcss-parser-tests/cases/prop.css");
assert_snap_ast!("../../tasks/coverage/postcss-parser-tests/cases/prop.css");
}

#[test]
Expand All @@ -153,8 +148,7 @@ fn postcss_raw_decl() {
#[test]
#[cfg(feature = "serde")]
fn postcss_rule_at() {
// FIXME: this fails we need CI green for now.
// assert_snap_ast!("../../tasks/coverage/postcss-parser-tests/cases/rule-at.css");
assert_snap_ast!("../../tasks/coverage/postcss-parser-tests/cases/rule-at.css");
}

#[test]
Expand Down
156 changes: 83 additions & 73 deletions crates/hdx_ast/tests/snapshots/basic_snapshots__basic_media.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,86 +3,96 @@ source: crates/hdx_ast/tests/basic_snapshots.rs
expression: result.output.unwrap()
---
{
"node": {
"type": "stylesheet",
"rules": [
{
"node": {
"type": "Media",
"query": {
"node": [
"type": "stylesheet",
"rules": [
{
"type": "MediaRule",
"at_keyword": {
"kind": "AtKeyword",
"offset": 0,
"len": 6
},
"query": [
{
"precondition": null,
"media_type": {
"type": "All",
"kind": "Ident",
"offset": 7,
"len": 6
},
"condition": null
}
],
"block": {
"open": {
"kind": "LeftCurly",
"len": 1
},
"rules": [
{
"type": "stylerule",
"selectors": [
{
"node": {
"precondition": null,
"media_type": {
"type": "Screen"
},
"condition": null
},
"start": 6,
"end": 13
"components": [
{
"type": "tag",
"value": {
"Html": {
"Body": {
"kind": "Ident",
"offset": 17,
"len": 4
}
}
}
}
],
"comma": null
}
],
"start": 6,
"end": 13
},
"rules": {
"node": [
"type": "style-declaration",
"open": {
"kind": "LeftCurly",
"len": 1
},
"declarations": [
{
"node": {
"type": "stylerule",
"selectors": {
"node": [
{
"node": [
{
"type": "tag",
"value": {
"Html": "Body"
}
}
],
"start": 17,
"end": 21
}
],
"start": 15,
"end": 21
},
"node": {
"type": "style-declaration",
"declarations": [
{
"node": {
"type": "property",
"name": "color",
"value": {
"Named": "black"
},
"important": false
},
"start": 23,
"end": 38
}
],
"rules": []
},
"start": 21,
"end": 41
"type": "property",
"name": {
"kind": "Ident",
"offset": 26,
"len": 5
},
"colon": {
"kind": "Colon",
"len": 1
},
"start": 15,
"end": 41
"value": {
"Named": {
"black": {
"kind": "Ident",
"offset": 33,
"len": 5
}
}
},
"important": null,
"semicolon": null
}
],
"start": 13,
"end": 43
"rules": [],
"close": {
"kind": "RightCurly",
"len": 1
}
}
},
"start": 0,
"end": 43
],
"close": {
"kind": "RightCurly",
"len": 1
}
}
]
},
"start": 0,
"end": 43
}
]
}
Loading

0 comments on commit d177d80

Please sign in to comment.