Format authored monorepo code with pinned language formatters

This commit is contained in:
Timothy J. Aveni
2026-09-15 15:23:24 -07:00
parent a174faea5c
commit 00fc2b9ff1
69 changed files with 5135 additions and 3306 deletions
+6 -7
View File
@@ -5,14 +5,12 @@ import { test } from "node:test";
const cli = resolve(process.cwd(), "dist/src/capability-language/cli.js");
const runResourceCheck = (source: string) => spawnSync(
process.execPath,
[cli, "--resource", "--check", "-"],
{ input: source, encoding: "utf8" },
);
const runResourceCheck = (source: string) =>
spawnSync(process.execPath, [cli, "--resource", "--check", "-"], { input: source, encoding: "utf8" });
test("capability CLI checks a standalone interface resource", () => {
const result = runResourceCheck(`interface WeatherBase id "interface:weather-base" revision "interface:weather-base@1" {
const result =
runResourceCheck(`interface WeatherBase id "interface:weather-base" revision "interface:weather-base@1" {
value temperature id "member:weather:temperature" : double {
get id "operation:weather:temperature:get";
}
@@ -22,7 +20,8 @@ test("capability CLI checks a standalone interface resource", () => {
});
test("capability CLI reports invalid standalone interface members", () => {
const result = runResourceCheck(`interface WeatherBase id "interface:weather-base" revision "interface:weather-base@1" {
const result =
runResourceCheck(`interface WeatherBase id "interface:weather-base" revision "interface:weather-base@1" {
value temperature : definitely-not-a-type;
}\n`);
assert.notEqual(result.status, 0);