mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-22 01:37:50 +00:00
chore(compiler): Enable strict property access TS compiler flag. (#6255)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
*/
|
||||
|
||||
// Patch: Unset NO_COLOR at the very top before any imports
|
||||
if (process.env.NO_COLOR !== undefined) {
|
||||
delete process.env.NO_COLOR;
|
||||
if (process.env['NO_COLOR'] !== undefined) {
|
||||
delete process.env['NO_COLOR'];
|
||||
}
|
||||
|
||||
import { describe, it, expect, beforeEach } from 'vitest';
|
||||
@@ -87,13 +87,13 @@ describe('ThemeManager', () => {
|
||||
});
|
||||
|
||||
it('should return NoColorTheme if NO_COLOR is set', () => {
|
||||
const original = process.env.NO_COLOR;
|
||||
process.env.NO_COLOR = '1';
|
||||
const original = process.env['NO_COLOR'];
|
||||
process.env['NO_COLOR'] = '1';
|
||||
expect(themeManager.getActiveTheme().name).toBe('NoColor');
|
||||
if (original === undefined) {
|
||||
delete process.env.NO_COLOR;
|
||||
delete process.env['NO_COLOR'];
|
||||
} else {
|
||||
process.env.NO_COLOR = original;
|
||||
process.env['NO_COLOR'] = original;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user