Skip to content

Commit b2b83d3

Browse files
committed
fix test
fix/sync error message
1 parent dbdf2dc commit b2b83d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ export class YamlCompiler {
277277
const pythonParser = new PythonParser(codeString);
278278
return pythonParser.transpileToJs();
279279
} catch (e: any) {
280-
errorsReport.error(`Can't parse python expression. Most likely this type of syntax isn't supported yet: ${e.message || e}`);
280+
errorsReport.error(`Failed to parse Python expression. Most likely this type of syntax isn't supported yet: ${e.message || e}`);
281281
}
282282

283283
return t.nullLiteral();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ describe('Yaml Schema Testing', () => {
129129

130130
throw new Error('compile must return an error');
131131
} catch (e: any) {
132-
expect(e.message).toContain('Can\'t parse python expression');
132+
expect(e.message).toContain('Failed to parse Python expression');
133133
}
134134
});
135135

@@ -150,7 +150,7 @@ describe('Yaml Schema Testing', () => {
150150

151151
throw new Error('compile must return an error');
152152
} catch (e: any) {
153-
expect(e.message).toContain('name isn\'t defined for dimension: ');
153+
expect(e.message).toContain('name isn\'t defined for dimension');
154154
}
155155
});
156156

@@ -479,7 +479,7 @@ describe('Yaml Schema Testing', () => {
479479
await compiler.compile();
480480
throw new Error('compile must return an error');
481481
} catch (e: any) {
482-
expect(e.message).toContain('dimension.granularitys must be defined as array');
482+
expect(e.message).toContain('must be defined as array');
483483
}
484484
});
485485

0 commit comments

Comments
 (0)