refactor(core): better failure message for explicit-query timing tslint rule (#29258)
Improves the failure message for the `explicit-query` timing TSLint rule that is used within Google. Currently it's not very clear what action developers need to take in order to resolve the lint failure manually. PR Close #29258
This commit is contained in:

committed by
Matias Niemelä

parent
8ef46f38f4
commit
90df7de54d
@ -109,7 +109,7 @@ describe('Google3 explicitQueryTiming TSLint rule', () => {
|
||||
const failures = linter.getResult().failures;
|
||||
|
||||
expect(failures.length).toBe(1);
|
||||
expect(failures[0].getFailure()).toContain('Query is not explicitly marked as "static"');
|
||||
expect(failures[0].getFailure()).toMatch(/analysis of the query.*"static"/);
|
||||
});
|
||||
|
||||
it('should report non-explicit dynamic query definitions', () => {
|
||||
@ -126,6 +126,6 @@ describe('Google3 explicitQueryTiming TSLint rule', () => {
|
||||
const failures = linter.getResult().failures;
|
||||
|
||||
expect(failures.length).toBe(1);
|
||||
expect(failures[0].getFailure()).toContain('Query is not explicitly marked as "dynamic"');
|
||||
expect(failures[0].getFailure()).toMatch(/analysis of the query.*"dynamic"/);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user