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
+5 -1
View File
@@ -28,6 +28,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
const ava_1 = __importDefault(require("ava"));
const debugArtifacts = __importStar(require("./debug-artifacts"));
const feature_flags_1 = require("./feature-flags");
const testing_utils_1 = require("./testing-utils");
const util_1 = require("./util");
(0, ava_1.default)("sanitizeArtifactName", (t) => {
t.deepEqual(debugArtifacts.sanitizeArtifactName("hello-world_"), "hello-world_");
t.deepEqual(debugArtifacts.sanitizeArtifactName("hello`world`"), "helloworld");
@@ -36,6 +39,7 @@ const debugArtifacts = __importStar(require("./debug-artifacts"));
});
(0, ava_1.default)("uploadDebugArtifacts", async (t) => {
// Test that no error is thrown if artifacts list is empty.
await t.notThrowsAsync(debugArtifacts.uploadDebugArtifacts([], "rootDir", "artifactName"));
const mockFeature = (0, testing_utils_1.createFeatures)([feature_flags_1.Feature.ArtifactUpgrade]);
await t.notThrowsAsync(debugArtifacts.uploadDebugArtifacts([], "rootDir", "artifactName", util_1.GitHubVariant.DOTCOM, mockFeature));
});
//# sourceMappingURL=debug-artifacts.test.js.map