Skip to content
Extraits de code Groupes Projets
Valider a4bd75e0 rédigé par Will Hunt's avatar Will Hunt
Parcourir les fichiers

Test that the minimal and sample configs pass validation

parent 90b13011
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
import * as yaml from "js-yaml";
import * as Chai from "chai";
import { ConfigValidator } from "matrix-appservice-bridge";
const expect = Chai.expect;
describe("ConfigSchema", () => {
const validator = new ConfigValidator("./config/config.schema.yaml");
it("should successfully validate a minimal config", () => {
const yamlConfig = yaml.safeLoad(`
bridge:
domain: localhost
homeserverUrl: "http://localhost:8008"
auth:
clientID: foo
botToken: foobar`);
validator.validate(yamlConfig);
});
it("should successfully validate the sample config", () => {
validator.validate("./config/config.sample.yaml");
});
});
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter