Commit 73d3c60
johnlanni
test(ai-prompt-decorator): drop wasm host from regex helper test
The "regex rule supports capture references" subtest only exercises the
applyReplaceRulesToContent helper on rules that parseConfig has compiled.
Going through test.RunTest and host.GetMatchConfig in wasm mode requires
an active common HTTP context, which the helper subtest never sets up,
so CI failed with "http context is not a common http context" once a
main.wasm artifact was present.
Call parseConfig directly with gjson.ParseBytes to compile the regex
rule and assert against the helper. This keeps the test focused on the
helper logic and behaves identically in `go test` and CI regardless of
whether main.wasm is built.1 parent 745600f commit 73d3c60
1 file changed
Lines changed: 11 additions & 11 deletions
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
754 | 755 | | |
755 | 756 | | |
756 | 757 | | |
757 | | - | |
758 | | - | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
759 | 763 | | |
760 | 764 | | |
761 | 765 | | |
| |||
766 | 770 | | |
767 | 771 | | |
768 | 772 | | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
778 | 778 | | |
779 | 779 | | |
0 commit comments