Skip to content

Commit 3956d95

Browse files
committed
Rename test
1 parent 8199622 commit 3956d95

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

library/vulnerabilities/sql-injection/detectSQLInjection.sqlite.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@ import { detectSQLInjection } from "./detectSQLInjection";
33
import { SQLDialectSQLite } from "./dialects/SQLDialectSQLite";
44

55
t.test("It flags the VACUUM command as SQL injection", async () => {
6-
isNotSQLInjection("VACUUM;", "VACUUM");
6+
isSqlInjection("VACUUM;", "VACUUM;");
77
});
88

9+
t.test(
10+
"It does not flag the VACUUM command without semicolon as SQL injection",
11+
async () => {
12+
isNotSQLInjection("VACUUM;", "VACUUM");
13+
}
14+
);
15+
916
t.test("It flags the ATTACH command as SQL injection", async () => {
1017
isSqlInjection("ATTACH DATABASE 'test.db' AS test;", "'test.db' AS test");
1118
});

0 commit comments

Comments
 (0)