refactor: 리펙토링
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { indexInvalidationRegistry } from "../../src/contracts/query-invalidation.ts";
|
||||
|
||||
describe("query invalidation registry", () => {
|
||||
it.each([
|
||||
{
|
||||
label: "topic",
|
||||
registry: {
|
||||
topics: ["orders\u0000private"],
|
||||
namespaces: ["orders"],
|
||||
edges: [{ topicId: "orders\u0000private", namespace: "orders" }],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "namespace",
|
||||
registry: {
|
||||
topics: ["orders"],
|
||||
namespaces: ["orders\u001fprivate"],
|
||||
edges: [{ topicId: "orders", namespace: "orders\u001fprivate" }],
|
||||
},
|
||||
},
|
||||
])("rejects control characters in a registry $label", ({ registry }) => {
|
||||
expect(() => indexInvalidationRegistry(registry)).toThrow(/is invalid/u);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user