You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
uptime-kuma/test/backend-test
Radu Lucuț 6a9f800f58
feat: add DNS support via Globalping (#6850)
1 day ago
..
monitor-conditions chore: enable formatting over the entire codebase in CI (#6655) 1 month ago
monitors fix: Gamedig unable to resolve SRV records by removing redundant DNS resolution in GameDigMonitorType (#6923) 6 days ago
notification-providers fix: Expand the logging around AggregateError (#6664) 1 month ago
README.md chore: enable formatting over the entire codebase in CI (#6655) 1 month ago
check-translations.test.js chore: add a test case so that a substantative placeholder changes are appant to contributors (#6681) 1 month ago
test-cert-hostname-match.js cert hostname 2 months ago
test-domain.js fix: handle multi-level public suffixes in RDAP lookup (#6752) 1 month ago
test-globalping.js feat: add DNS support via Globalping (#6850) 1 day ago
test-migration.js chore: enable formatting over the entire codebase in CI (#6655) 1 month ago
test-monitor-response.js feat: Add configurable response data storage for notifications (#6684) 1 month ago
test-snmp.js feat(snmp): add SNMPv3 noAuthNoPriv support with backend test (#6552) 1 month ago
test-status-page.js fix: RSS pubDate timezone issue with backend test (#6422) (#6805) 4 weeks ago
test-system-service.js chore: enable formatting over the entire codebase in CI (#6655) 1 month ago
test-uptime-calculator.js chore: enable formatting over the entire codebase in CI (#6655) 1 month ago
test-util-server.js fix: idn ping errors (#6662) 1 month ago
test-util.js fix: Proper processing of date fields (Domain Expiry) with cleanup of unnecessary Date comparison functions (#6638) 1 month ago

README.md

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