-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathrun-tasks.test.mjs
More file actions
35 lines (31 loc) · 1.15 KB
/
Copy pathrun-tasks.test.mjs
File metadata and controls
35 lines (31 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
import assert from "node:assert/strict";
import test from "node:test";
import { getTaskSteps } from "../run-tasks.mjs";
test("leaves generated Rust formatting to the generator", () => {
const rustSteps = getTaskSteps("generate", "rust");
assert.deepEqual(rustSteps, [
{
language: "rust",
cwd: "scripts/codegen",
executable: "npm",
args: ["run", "generate:rust"],
},
]);
assert.deepEqual(
getTaskSteps("generate").filter((step) => step.language === "rust"),
rustSteps,
);
});
test("retains the explicit SDK Rust formatting command", () => {
assert.deepEqual(getTaskSteps("format", "rust"), [
{
language: "rust",
cwd: "rust",
executable: "cargo",
args: ["+nightly-2026-04-14", "fmt", "--all", "--", "--config-path", ".rustfmt.nightly.toml"],
},
]);
});