mirror of
https://github.com/morluto/rea.git
synced 2026-12-04 05:51:06 +00:00
test(javascript): share response consumer fixtures (#16445)
This commit is contained in:
1 parent
1e6d47667e
commit
5c23e89e36
5 files changed
+28
-49
No files matched your search
@@ -1,10 +1,9 @@
|
||||
import { expect, it } from "vitest";
|
||||
import { analyzeJavaScriptSemantics } from "./javascriptSemanticAnalysis.js";
|
||||
import { responseConsumers } from "./javascriptSemanticResponseConsumers.fixture.js";
|
||||
|
||||
const consumers = (source: string) =>
|
||||
analyzeJavaScriptSemantics(source).requestOperations.filter(
|
||||
({ kind }) => kind === "response-consumer",
|
||||
);
|
||||
responseConsumers(analyzeJavaScriptSemantics(source));
|
||||
|
||||
it.each([
|
||||
'let response = await fetch("data:text/plain,original"); response = {text: () => "replacement"}; response.text();',
|
||||
|
||||
Reference in new issue
Block a user