Skip to content

Commit

Permalink
chore(mustache): add tests for new mustache parsing (#1771)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddOnTop authored Apr 23, 2024
1 parent 8d4055c commit 19e1cd8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/mustache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,19 @@ mod tests {
Mustache::from(vec![Segment::Literal("test:{SHA}string".to_string())])
);
}

#[test]
fn test_optional_dot_expression() {
let s = r"{{.foo.bar}}";
let mustache: Mustache = Mustache::parse(s).unwrap();
assert_eq!(
mustache,
Mustache::from(vec![Segment::Expression(vec![
"foo".to_string(),
"bar".to_string(),
])])
);
}
}

mod render {
Expand Down

1 comment on commit 19e1cd8

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running 30s test @ http://localhost:8000/graphql

4 threads and 100 connections

Thread Stats Avg Stdev Max +/- Stdev
Latency 7.68ms 3.47ms 74.88ms 72.06%
Req/Sec 3.30k 267.85 4.51k 86.20%

394590 requests in 30.10s, 1.98GB read

Requests/sec: 13109.77

Transfer/sec: 67.29MB

Please sign in to comment.