mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
feat(testrun): refuse a run against a spec that registers no properties
A spec with no properties drove the app and reported no violations, which is indistinguishable from a spec that judged something and found nothing. Execute now aborts after loading the spec unless the run asks for the opt-out by name.
This commit is contained in:
1 parent
11c1569932
commit
7bafed8af4
4 files changed
+133
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>no-properties</title>
|
||||
</head>
|
||||
<body>
|
||||
<button id="increment">+</button>
|
||||
<div id="counter">0</div>
|
||||
<script>
|
||||
let value = 0;
|
||||
const display = document.getElementById("counter");
|
||||
document.getElementById("increment").addEventListener("click", function () {
|
||||
value += 1;
|
||||
display.textContent = String(value);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { extract, taps } from "@sanderling/spec";
|
||||
|
||||
export const counter = extract((s) => {
|
||||
const el = s.ax.find({ id: "counter" });
|
||||
return el ? parseInt(el.text, 10) || 0 : 0;
|
||||
}).named("counter");
|
||||
|
||||
export const properties = {};
|
||||
|
||||
export const actionsRoot = taps;
|
||||
Reference in new issue
Block a user