mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-03 00:37:01 +00:00
Fix backend tests and linting errors
Co-authored-by: CommanderStorm <26258709+CommanderStorm@users.noreply.github.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
"shorthand-property-no-redundant-values": null,
|
||||
"color-hex-length": null,
|
||||
"declaration-block-no-redundant-longhand-properties": null,
|
||||
"at-rule-no-unknown": null
|
||||
"at-rule-no-unknown": null,
|
||||
"function-no-unknown": null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,6 +398,7 @@ export default {
|
||||
/**
|
||||
* Show a warning toast
|
||||
* @param {string} msg Message to show
|
||||
* @param {...any} args Additional parameters for translation interpolation
|
||||
* @returns {void}
|
||||
*/
|
||||
toastWarning(msg, ...args) {
|
||||
|
||||
@@ -104,7 +104,8 @@ describe("Password Validation (NIST-aligned)", () => {
|
||||
const result = await validatePassword("password123456", true);
|
||||
assert.strictEqual(result.ok, true);
|
||||
assert.ok(result.warning, "Should have a warning for breached password");
|
||||
assert.match(result.warning, /data breaches/i);
|
||||
assert.strictEqual(result.warning.msg, "passwordFoundInDataBreach");
|
||||
assert.ok(result.warning.meta > 0, "Should have breach count greater than 0");
|
||||
});
|
||||
|
||||
test("should accept non-breached password with no warning", async () => {
|
||||
|
||||
Reference in New Issue
Block a user