browsertrix-crawler/tests/invalid-behaviors/invalid-export.js
Ilya Kreymer 8ca7756d1b
tests: remove example.com from tests (#885)
also use local http-server for behavior tests
2025-09-19 23:21:47 -07:00

20 lines
349 B
JavaScript

export class TestBehavior {
static init() {
return {
state: {},
};
}
static get id() {
return "TestBehavior";
}
static isMatch() {
return window.location.origin === "https://example-com.webrecorder.net";
}
async *run(ctx) {
ctx.log("In Test Behavior!");
yield ctx.Lib.getState(ctx, "test-stat");
}
}