You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
writeStreams.stderr(`\t... and ${errors.length-MAX_ERRORS} more`);
32
+
lete: string="";
33
+
for(leti=0,len=betterErrors.length;i<len;i++){
34
+
if(i+1>MAX_ERRORS){
35
+
e+=`\t... and ${len-MAX_ERRORS} more`;
36
+
break;
37
+
}
38
+
e+=chalk`\t• {redBright ${betterErrors[i].message}} at {blueBright ${betterErrors[i].path}}\n`;
40
39
}
41
40
42
-
writeStreams.stderr(chalk`\n\nFor further troubleshooting, consider either of the following:
41
+
assert(valid,chalk`
42
+
{reset Invalid .gitlab-ci.yml configuration!
43
+
${e.trimEnd()}
44
+
45
+
For further troubleshooting, consider either of the following:
43
46
\t• Copy the content of {blueBright ${terminalLink(".gitlab-ci-local/expanded-gitlab-ci.yml",pathToExpandedGitLabCi)}} to the ${terminalLink("pipeline editor","https://docs.gitlab.com/ee/ci/pipeline_editor/")} to debug it
44
-
\t• Use --json-schema-validation=false to disable schema validation (not recommended)
47
+
\t• Use --json-schema-validation=false to disable schema validation (not recommended)}
expect(writeStreams.stderrLines.join("\n")).toContain("property 'script' must not have fewer than 1 characters");
22
-
expect(writeStreams.stderrLines.join("\n")).toContain("'when' property must be one of [on_success, on_failure, always, never, manual, delayed] (found manual2)");
23
-
expect(writeStreams.stderrLines.join("\n")).toContain("'junit' property type must be string");
24
-
expect(writeStreams.stderrLines.join("\n")).toContain("'data' property is not expected to be here");
25
-
26
-
expect(mockExit).toHaveBeenCalledWith(1);
15
+
try{
16
+
awaithandler({
17
+
cwd: "tests/test-cases/schema-validation",
18
+
},writeStreams);
19
+
expect(true).toBe(false);
20
+
}catch(e: any){
21
+
assert(einstanceofAssertionError,"e is not instanceof AssertionError");
0 commit comments