JS: Add tests for functions with "use server" directive

This commit is contained in:
Asger F
2025-06-23 15:48:44 +02:00
parent 7dd7246cd4
commit d9f4e4a90d
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
async function getData(
x, // $ MISSING: threatModelSource=remote
y) { // $ MISSING: threatModelSource=remote
"use server";
}
async function getData2(
x, // should not be remote flow sources (because the function does not have "use server")
y) {
}

View File

@@ -0,0 +1,11 @@
"use server";
export async function getData(
x, // $ MISSING: threatModelSource=remote
y) { // $ MISSING: threatModelSource=remote
}
async function getData2(
x, // should not be remote flow sources (because the function is not exported)
y) {
}