Move debug artifact methods into separate file

This commit is contained in:
Angela P Wen 2022-08-02 12:27:52 +02:00
parent 5895ab0c0b
commit eeee462f05
18 changed files with 434 additions and 359 deletions

View file

@ -0,0 +1,18 @@
import test from "ava";
import * as debugArtifacts from "./debug-artifacts";
test("sanitizeArifactName", (t) => {
t.deepEqual(
debugArtifacts.sanitizeArifactName("hello-world_"),
"hello-world_"
);
t.deepEqual(debugArtifacts.sanitizeArifactName("hello`world`"), "helloworld");
t.deepEqual(debugArtifacts.sanitizeArifactName("hello===123"), "hello123");
t.deepEqual(
debugArtifacts.sanitizeArifactName("*m)a&n^y%i££n+v!a:l[i]d"),
"manyinvalid"
);
});
// TODO(angelapwen): Test uploadDebugArtifacts if toUpload is empty