Skip to content

Commit 732d304

Browse files
committed
fix tests
1 parent 4491f6b commit 732d304

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/cubejs-schema-compiler/src/compiler/ErrorReporter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,16 @@ export class ErrorReporter {
141141
return this.rootReporter().errors;
142142
}
143143

144-
public addErrors(errors: CompilerErrorInterface[]) {
145-
this.rootReporter().errors.push(...errors);
144+
public addErrors(errors: any[]) {
145+
errors.forEach((e: any) => { this.error(e); });
146146
}
147147

148148
public getWarnings() {
149149
return this.rootReporter().warnings;
150150
}
151151

152-
public addWarnings(warnings: SyntaxErrorInterface[]) {
153-
this.rootReporter().warnings.push(...warnings);
152+
public addWarnings(warnings: any[]) {
153+
warnings.forEach((w: any) => { this.warning(w); });
154154
}
155155

156156
protected rootReporter(): ErrorReporter {

packages/cubejs-schema-compiler/test/unit/transpilers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('Transpilers', () => {
2727

2828
throw new Error('Compile should thrown an error');
2929
} catch (e: any) {
30-
expect(e.message).toMatch(/Duplicate property parsing test1 in main.js/);
30+
expect(e.message).toMatch(/Duplicate property parsing test1/);
3131
}
3232
});
3333

0 commit comments

Comments
 (0)