test(compiler-cli): disable DynamicValue diagnostic tests on Windows (#37763)
This commit disables all diagnostic tests for DynamicValue diagnostics which make assertions about the diagnostic filename while running tests on Windows. Such assertions are currently suffering from a case sensitivity issue. PR Close #37763
This commit is contained in:
parent
4c7f32f28c
commit
2cbc429291
|
@ -6,6 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {platform} from 'os';
|
||||
import * as ts from 'typescript';
|
||||
|
||||
import {FatalDiagnosticError} from '../../diagnostics';
|
||||
|
@ -14,11 +15,15 @@ import {runInEachFileSystem, TestFile} from '../../file_system/testing';
|
|||
import {PartialEvaluator} from '../../partial_evaluator';
|
||||
import {TypeScriptReflectionHost} from '../../reflection';
|
||||
import {getDeclaration, makeProgram} from '../../testing';
|
||||
|
||||
import {createValueHasWrongTypeError} from '../src/diagnostics';
|
||||
|
||||
runInEachFileSystem(() => {
|
||||
runInEachFileSystem(os => {
|
||||
describe('ngtsc annotation diagnostics', () => {
|
||||
// These tests are currently disabled when running in Windows mode as the assertions involving
|
||||
// the filename attached to the diagnostic are suffering from a case-sensitivity issue.
|
||||
//
|
||||
// TODO(JoostK): re-enable on Windows once the case issue has been solved.
|
||||
if (os !== 'Windows' && platform() !== 'win32') {
|
||||
describe('createValueError()', () => {
|
||||
it('should include a trace for dynamic values', () => {
|
||||
const error = createError('', 'nonexistent', 'Error message');
|
||||
|
@ -91,6 +96,9 @@ runInEachFileSystem(() => {
|
|||
expect(error.relatedInformation).not.toBeDefined();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
it('should not be empty', () => {});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {platform} from 'os';
|
||||
import * as ts from 'typescript';
|
||||
|
||||
import {absoluteFrom as _, absoluteFromSourceFile} from '../../file_system';
|
||||
|
@ -13,14 +14,13 @@ import {runInEachFileSystem} from '../../file_system/testing';
|
|||
import {Reference} from '../../imports';
|
||||
import {TypeScriptReflectionHost} from '../../reflection';
|
||||
import {getDeclaration, makeProgram} from '../../testing';
|
||||
|
||||
import {ObjectAssignBuiltinFn} from '../src/builtin';
|
||||
import {describeResolvedType, traceDynamicValue} from '../src/diagnostics';
|
||||
import {DynamicValue} from '../src/dynamic';
|
||||
import {PartialEvaluator} from '../src/interface';
|
||||
import {EnumValue, ResolvedModule} from '../src/result';
|
||||
|
||||
runInEachFileSystem(() => {
|
||||
runInEachFileSystem(os => {
|
||||
describe('partial evaluator', () => {
|
||||
describe('describeResolvedType()', () => {
|
||||
it('should describe primitives', () => {
|
||||
|
@ -100,6 +100,7 @@ runInEachFileSystem(() => {
|
|||
});
|
||||
});
|
||||
|
||||
if (os !== 'Windows' && platform() !== 'win32') {
|
||||
describe('traceDynamicValue()', () => {
|
||||
it('should not include the origin node if points to a different dynamic node.', () => {
|
||||
// In the below expression, the read of "value" is evaluated to be dynamic, but it's also
|
||||
|
@ -262,6 +263,7 @@ runInEachFileSystem(() => {
|
|||
expect(getSourceCode(trace[2])).toBe('document: any');
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue