Use new artifact dependency if not on GHES & feature flag enabled

This commit is contained in:
Angela P Wen
2024-09-25 13:58:25 -07:00
parent 6d887c18f0
commit 4de3002533
21 changed files with 278 additions and 51 deletions
+11 -1
View File
@@ -1,6 +1,9 @@
import test from "ava";
import * as debugArtifacts from "./debug-artifacts";
import { Feature } from "./feature-flags";
import { createFeatures } from "./testing-utils";
import { GitHubVariant } from "./util";
test("sanitizeArtifactName", (t) => {
t.deepEqual(
@@ -20,7 +23,14 @@ test("sanitizeArtifactName", (t) => {
test("uploadDebugArtifacts", async (t) => {
// Test that no error is thrown if artifacts list is empty.
const mockFeature = createFeatures([Feature.ArtifactUpgrade]);
await t.notThrowsAsync(
debugArtifacts.uploadDebugArtifacts([], "rootDir", "artifactName"),
debugArtifacts.uploadDebugArtifacts(
[],
"rootDir",
"artifactName",
GitHubVariant.DOTCOM,
mockFeature,
),
);
});