mirror of
https://github.com/github/codeql-action.git
synced 2026-05-13 01:10:21 +00:00
Use new artifact dependency if not on GHES & feature flag enabled
This commit is contained in:
@@ -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,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user