Unified · Split
| @@ -83,9 +83,11 @@ describe("file secrets data directory", () => { · 82 unmodified lines | ||
| 83 | 83 | const authPath = first.executor.fileSecrets.filePath; |
| 84 | 84 | expect(authPath).toBe(join(dataDir, "auth.json")); |
| 85 | 85 | expect(existsSync(authPath)).toBe(true); |
| 86 | − expect(readFileSync(authPath, "utf8")).toContain( | |
| 87 | − '"connection:org:durable-secrets:main:token": "secret-token"', | |
| 86 | + const storedCredentials = readFileSync(authPath, "utf8"); | |
| 87 | + expect(storedCredentials).toMatch( | |
| 88 | + /"connection:org:durable-secrets:main:[^"]+:token": "secret-token"/, | |
| 88 | 89 | ); |
| 90 | + expect(storedCredentials).not.toContain('"connection:org:durable-secrets:main:token"'); | |
| 89 | 91 | expect(existsSync(join(dataDir, "test.db"))).toBe(true); |
| 90 | 92 | return authPath; |
| 91 | 93 | }), |