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
Markus Reisenhofer d096e2902c
feat(gamedig): Update gamedig implementation to v5 (#4949)
4 months ago
..
monitor-conditions fix fmt 4 months ago
monitors feat(gamedig): Update gamedig implementation to v5 (#4949) 4 months ago
notification-providers Update test/backend-test/notification-providers/test-ntlm.js 4 months ago
README.md update the readme 4 months ago
test-cert-hostname-match.js cert hostname 4 months ago
test-domain.js move the webhook to a better place 4 months ago
test-migration.js improve naming for migration tests 4 months ago
test-status-page.js fix(rss): fix the rss endpoint having the wrong content type (#6570) 4 months ago
test-system-service.js Corrected lining errors resulting from Github "Commit suggestion" choice 4 months ago
test-uptime-calculator.js make sure the calculator uses a suite 4 months ago
test-util.js move the maintenance to the utils test 4 months 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