mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
test: collapse duplicate gateway token-generation cases
This commit is contained in:
@@ -65,23 +65,11 @@ describe("buildGatewayAuthConfig", () => {
|
||||
expect(result).toEqual({ mode: "password", password: "undefined" });
|
||||
});
|
||||
|
||||
it("generates random token when token param is undefined", () => {
|
||||
it("generates random token for missing, empty, and coerced-literal token inputs", () => {
|
||||
expectGeneratedTokenFromInput(undefined);
|
||||
});
|
||||
|
||||
it("generates random token when token param is empty string", () => {
|
||||
expectGeneratedTokenFromInput("");
|
||||
});
|
||||
|
||||
it("generates random token when token param is whitespace only", () => {
|
||||
expectGeneratedTokenFromInput(" ");
|
||||
});
|
||||
|
||||
it('generates random token when token param is the literal string "undefined"', () => {
|
||||
expectGeneratedTokenFromInput("undefined");
|
||||
});
|
||||
|
||||
it('generates random token when token param is the literal string "null"', () => {
|
||||
expectGeneratedTokenFromInput("null", "null");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user