uptime-kuma/test/backend-test
Dmitry 751fe1bbf5
feat: Add configurable response data storage for notifications (#6684)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-12 18:39:12 +01:00
..
monitor-conditions chore: enable formatting over the entire codebase in CI (#6655) 2026-01-09 02:10:36 +01:00
monitors chore: enable formatting over the entire codebase in CI (#6655) 2026-01-09 02:10:36 +01:00
notification-providers fix: Expand the logging around AggregateError (#6664) 2026-01-11 00:59:04 +00:00
check-translations.test.js chore: add a test case so that a substantative placeholder changes are appant to contributors (#6681) 2026-01-12 10:37:09 +00:00
README.md chore: enable formatting over the entire codebase in CI (#6655) 2026-01-09 02:10:36 +01:00
test-cert-hostname-match.js cert hostname 2026-01-01 16:39:00 +01:00
test-domain.js fix: Proper processing of date fields (Domain Expiry) with cleanup of unnecessary Date comparison functions (#6638) 2026-01-09 04:18:17 +01:00
test-migration.js chore: enable formatting over the entire codebase in CI (#6655) 2026-01-09 02:10:36 +01:00
test-monitor-response.js feat: Add configurable response data storage for notifications (#6684) 2026-01-12 18:39:12 +01:00
test-status-page.js chore: enable formatting over the entire codebase in CI (#6655) 2026-01-09 02:10:36 +01:00
test-system-service.js chore: enable formatting over the entire codebase in CI (#6655) 2026-01-09 02:10:36 +01:00
test-uptime-calculator.js chore: enable formatting over the entire codebase in CI (#6655) 2026-01-09 02:10:36 +01:00
test-util-server.js fix: idn ping errors (#6662) 2026-01-11 19:28:07 +08:00
test-util.js fix: Proper processing of date fields (Domain Expiry) with cleanup of unnecessary Date comparison functions (#6638) 2026-01-09 04:18:17 +01:00

Node.js Test Runner

Documentation: https://nodejs.org/api/test.html

Create a test file in this directory with the name *.js.

Tip

Writing great tests is hard.

You can make our live much simpler by following this guidance:

  • Use describe() to group related tests
  • Use test() for individual test cases
  • One test per scenario
  • Use descriptive test names: function() [behavior] [condition]
  • Don't prefix with "Test" or "Should"

Template

const { describe, test } = require("node:test");
const assert = require("node:assert");

describe("Feature Name", () => {
  test("function() returns expected value when condition is met", () => {
    assert.strictEqual(1, 1);
  });
});

Run

npm run test-backend