Repository: rokucommunity/brighterscript (ts)

Issue:
Test assertions with Mocha/Chai produce useless output
### ISSUE

As a developer looking to contribute to the codebase, when I run unit tests that have a failure, they often produce unhelpful / incomplete feedback.

For example:

```
Failed: Expected [ Array(3) ] to include "namespace must be declared at the root level"
```

### SUGGESTION

This is just a developer experience thing, but I'm positive Mocha can produce better results than this... where's the diff output, the list of what _was_ in the array versus what was _expected_ in the Array, etc.? (This is especially jarring coming from Jest where that stuff is "just handled".)

I'm not sure whether the fix for this is in chai, mocha, an option we can turn on/off in package.json, or something else -- just leaving it as an issue we could fix in future.



Pull request description:
Tests: disable object truncation
### SUMMARY

Disable object truncation in assertion failures, to ease debugging in some situations. (Fixes #710)

### DETAILS

 - Add the configuration option @TwitchBronBron discovered for Chai
 - Create a single "config" file to hold configuration options for Chai
 - Switch all imports to use the configured Chai

In some test frameworks, you would do this in a configuration file, or a special "setup helper" file, but based on the docs it looks like the pattern above is the expected pattern for configuring Chai.

### TESTS

 - Unit tests passing
 - Confirmed that `.equal` and `.include` on an array of strings prints the full diagnostic.



Patch:
diff --git a/src/Cache.spec.ts b/src/Cache.spec.ts
index 91eaeb08..18a0912f 100644
--- a/src/Cache.spec.ts
+++ b/src/Cache.spec.ts
@@ -1,5 +1,5 @@
 import { Cache } from './Cache';
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 
 describe('Cache', () => {
     let cache: Cache;
diff --git a/src/CommentFlagProcessor.spec.ts b/src/CommentFlagProcessor.spec.ts
index 39c7dea9..5b72ab8e 100644
--- a/src/CommentFlagProcessor.spec.ts
+++ b/src/CommentFlagProcessor.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import { Range } from 'vscode-languageserver';
 import { CommentFlagProcessor } from './CommentFlagProcessor';
 import { Lexer } from './lexer/Lexer';
diff --git a/src/DependencyGraph.spec.ts b/src/DependencyGraph.spec.ts
index 7d8f4bf9..cc3a798c 100644
--- a/src/DependencyGraph.spec.ts
+++ b/src/DependencyGraph.spec.ts
@@ -1,6 +1,6 @@
 import { DependencyGraph } from './DependencyGraph';
 import * as sinon from 'sinon';
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 
 describe('DependencyGraph', () => {
     let graph: DependencyGraph;
diff --git a/src/DiagnosticCollection.spec.ts b/src/DiagnosticCollection.spec.ts
index ed13cb61..82a03ca0 100644
--- a/src/DiagnosticCollection.spec.ts
+++ b/src/DiagnosticCollection.spec.ts
@@ -4,7 +4,7 @@ import type { Project } from './LanguageServer';
 import type { ProgramBuilder } from './ProgramBuilder';
 import type { BscFile } from './interfaces';
 import util from './util';
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 
 describe('DiagnosticCollection', () => {
     let collection: DiagnosticCollection;
diff --git a/src/DiagnosticFilterer.spec.ts b/src/DiagnosticFilterer.spec.ts
index 1570f329..ec425644 100644
--- a/src/DiagnosticFilterer.spec.ts
+++ b/src/DiagnosticFilterer.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import { DiagnosticFilterer } from './DiagnosticFilterer';
 import type { BsDiagnostic } from './interfaces';
 import { standardizePath as s } from './util';
diff --git a/src/DiagnosticMessages.spec.ts b/src/DiagnosticMessages.spec.ts
index fbb28566..fa54bfc9 100644
--- a/src/DiagnosticMessages.spec.ts
+++ b/src/DiagnosticMessages.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 
 import { DiagnosticMessages } from './DiagnosticMessages';
 
diff --git a/src/FunctionScope.spec.ts b/src/FunctionScope.spec.ts
index af7abb46..e7b6e1e1 100644
--- a/src/FunctionScope.spec.ts
+++ b/src/FunctionScope.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 
 import { FunctionScope } from './FunctionScope';
 import { Program } from './Program';
diff --git a/src/LanguageServer.spec.ts b/src/LanguageServer.spec.ts
index 480fd337..f30cb6b6 100644
--- a/src/LanguageServer.spec.ts
+++ b/src/LanguageServer.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import * as fsExtra from 'fs-extra';
 import * as path from 'path';
 import type { DidChangeWatchedFilesParams, Location } from 'vscode-languageserver';
diff --git a/src/Logger.spec.ts b/src/Logger.spec.ts
index e34a7eee..60248539 100644
--- a/src/Logger.spec.ts
+++ b/src/Logger.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import { Logger, LogLevel, noop } from './Logger';
 import chalk from 'chalk';
 import { createSandbox } from 'sinon';
diff --git a/src/PluginInterface.spec.ts b/src/PluginInterface.spec.ts
index 6541c816..bd914bc9 100644
--- a/src/PluginInterface.spec.ts
+++ b/src/PluginInterface.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import * as sinon from 'sinon';
 import { Logger } from './Logger';
 import PluginInterface from './PluginInterface';
diff --git a/src/Program.spec.ts b/src/Program.spec.ts
index a6354b58..a5599142 100644
--- a/src/Program.spec.ts
+++ b/src/Program.spec.ts
@@ -1,4 +1,4 @@
-import { assert, expect } from 'chai';
+import { assert, expect } from './chai-config.spec';
 import * as pick from 'object.pick';
 import * as sinonImport from 'sinon';
 import { CompletionItemKind, Position, Range } from 'vscode-languageserver';
diff --git a/src/ProgramBuilder.spec.ts b/src/ProgramBuilder.spec.ts
index cc59f999..f6a72c71 100644
--- a/src/ProgramBuilder.spec.ts
+++ b/src/ProgramBuilder.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import * as fsExtra from 'fs-extra';
 import { createSandbox } from 'sinon';
 const sinon = createSandbox();
@@ -357,4 +357,3 @@ function createDiagnostic(
     };
     return diagnostic;
 }
-
diff --git a/src/Scope.spec.ts b/src/Scope.spec.ts
index e4fc7dcc..17ad9981 100644
--- a/src/Scope.spec.ts
+++ b/src/Scope.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import * as sinonImport from 'sinon';
 import { Position, Range } from 'vscode-languageserver';
 import util, { standardizePath as s } from './util';
diff --git a/src/SemanticTokenUtils.spec.ts b/src/SemanticTokenUtils.spec.ts
index bdf2fff8..6506fc16 100644
--- a/src/SemanticTokenUtils.spec.ts
+++ b/src/SemanticTokenUtils.spec.ts
@@ -1,5 +1,5 @@
 /* eslint-disable no-bitwise */
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import { SemanticTokenModifiers, SemanticTokenTypes } from 'vscode-languageserver-protocol';
 import { encodeSemanticTokens, getModifierBitFlags, semanticTokensLegend } from './SemanticTokenUtils';
 import util from './util';
diff --git a/src/Stopwatch.spec.ts b/src/Stopwatch.spec.ts
index 911c4641..98fb02db 100644
--- a/src/Stopwatch.spec.ts
+++ b/src/Stopwatch.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import { Stopwatch } from './Stopwatch';
 import { util } from './util';
 
diff --git a/src/SymbolTable.spec.ts b/src/SymbolTable.spec.ts
index 96820668..005b2264 100644
--- a/src/SymbolTable.spec.ts
+++ b/src/SymbolTable.spec.ts
@@ -1,5 +1,5 @@
 import { SymbolTable } from './SymbolTable';
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import { StringType } from './types/StringType';
 import { IntegerType } from './types/IntegerType';
 
diff --git a/src/Throttler.spec.ts b/src/Throttler.spec.ts
index fa350ab4..d7f439f4 100644
--- a/src/Throttler.spec.ts
+++ b/src/Throttler.spec.ts
@@ -1,5 +1,5 @@
 /* eslint-disable @typescript-eslint/no-floating-promises */
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import { Throttler } from './Throttler';
 import { createSandbox, fake } from 'sinon';
 import { Deferred } from './deferred';
diff --git a/src/XmlScope.spec.ts b/src/XmlScope.spec.ts
index 03d8abbf..61cf23b9 100644
--- a/src/XmlScope.spec.ts
+++ b/src/XmlScope.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import { Position, Range } from 'vscode-languageserver';
 import { DiagnosticMessages } from './DiagnosticMessages';
 import type { XmlFile } from './files/XmlFile';
diff --git a/src/astUtils/AstEditor.spec.ts b/src/astUtils/AstEditor.spec.ts
index b35a5944..c1e1bda2 100644
--- a/src/astUtils/AstEditor.spec.ts
+++ b/src/astUtils/AstEditor.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import { BrsTranspileState } from '../parser/BrsTranspileState';
 import { AstEditor } from './AstEditor';
 import { util } from '../util';
diff --git a/src/astUtils/creators.spec.ts b/src/astUtils/creators.spec.ts
index 5f884add..9068dce2 100644
--- a/src/astUtils/creators.spec.ts
+++ b/src/astUtils/creators.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import { interpolatedRange } from '..';
 import { TranspileState } from '../parser/TranspileState';
 import { createStringLiteral } from './creators';
diff --git a/src/astUtils/reflection.spec.ts b/src/astUtils/reflection.spec.ts
index e9f708bc..519a0a25 100644
--- a/src/astUtils/reflection.spec.ts
+++ b/src/astUtils/reflection.spec.ts
@@ -1,5 +1,5 @@
 /* eslint-disable no-multi-spaces */
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import { PrintStatement, Block, Body, AssignmentStatement, CommentStatement, ExitForStatement, ExitWhileStatement, ExpressionStatement, FunctionStatement, IfStatement, IncrementStatement, GotoStatement, LabelStatement, ReturnStatement, EndStatement, StopStatement, ForStatement, ForEachStatement, WhileStatement, DottedSetStatement, IndexedSetStatement, LibraryStatement, NamespaceStatement, ImportStatement, ClassStatement, EmptyStatement, TryCatchStatement, CatchStatement, ThrowStatement } from '../parser/Statement';
 import { FunctionExpression, NamespacedVariableNameExpression, BinaryExpression, CallExpression, DottedGetExpression, IndexedGetExpression, GroupingExpression, EscapedCharCodeLiteralExpression, ArrayLiteralExpression, AALiteralExpression, UnaryExpression, VariableExpression, SourceLiteralExpression, NewExpression, CallfuncExpression, TemplateStringQuasiExpression, XmlAttributeGetExpression, TemplateStringExpression, TaggedTemplateStringExpression, AnnotationExpression } from '../parser/Expression';
 import type { Token } from '../lexer/Token';
diff --git a/src/astUtils/stackedVisitor.spec.ts b/src/astUtils/stackedVisitor.spec.ts
index 4b0af512..1b0c1d0b 100644
--- a/src/astUtils/stackedVisitor.spec.ts
+++ b/src/astUtils/stackedVisitor.spec.ts
@@ -1,4 +1,4 @@
-import { expect, assert } from 'chai';
+import { expect, assert } from '../chai-config.spec';
 import { createStackedVisitor } from './stackedVisitor';
 
 describe('createStackedVisitor', () => {
diff --git a/src/astUtils/visitors.spec.ts b/src/astUtils/visitors.spec.ts
index f86ec419..95fb959e 100644
--- a/src/astUtils/visitors.spec.ts
+++ b/src/astUtils/visitors.spec.ts
@@ -1,7 +1,7 @@
 /* eslint-disable no-multi-spaces */
 import type { CancellationToken } from 'vscode-languageserver';
 import { CancellationTokenSource, Range } from 'vscode-languageserver';
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import * as sinon from 'sinon';
 import { Program } from '../Program';
 import type { BrsFile } from '../files/BrsFile';
diff --git a/src/bscPlugin/codeActions/CodeActionsProcessor.spec.ts b/src/bscPlugin/codeActions/CodeActionsProcessor.spec.ts
index 50c958fe..f5e83ada 100644
--- a/src/bscPlugin/codeActions/CodeActionsProcessor.spec.ts
+++ b/src/bscPlugin/codeActions/CodeActionsProcessor.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../chai-config.spec';
 import { URI } from 'vscode-uri';
 import type { Range } from 'vscode-languageserver';
 import type { BscFile } from '../../interfaces';
diff --git a/src/bscPlugin/hover/HoverProcessor.spec.ts b/src/bscPlugin/hover/HoverProcessor.spec.ts
index d3de4df0..ff0c7383 100644
--- a/src/bscPlugin/hover/HoverProcessor.spec.ts
+++ b/src/bscPlugin/hover/HoverProcessor.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../chai-config.spec';
 import { Program } from '../../Program';
 import { util } from '../../util';
 import { createSandbox } from 'sinon';
diff --git a/src/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.ts b/src/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.ts
index 63c3e4dc..699437d6 100644
--- a/src/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.ts
+++ b/src/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../chai-config.spec';
 import { SemanticTokenModifiers, SemanticTokenTypes } from 'vscode-languageserver-protocol';
 import type { BrsFile } from '../../files/BrsFile';
 import type { BscFile, SemanticToken } from '../../interfaces';
diff --git a/src/bscPlugin/validation/BrsFileValidator.spec.ts b/src/bscPlugin/validation/BrsFileValidator.spec.ts
index 4bc3478c..992f59c8 100644
--- a/src/bscPlugin/validation/BrsFileValidator.spec.ts
+++ b/src/bscPlugin/validation/BrsFileValidator.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../chai-config.spec';
 import type { BrsFile } from '../../files/BrsFile';
 import type { AALiteralExpression, DottedGetExpression } from '../../parser/Expression';
 import type { ClassStatement, FunctionStatement, NamespaceStatement, PrintStatement } from '../../parser/Statement';
diff --git a/src/chai-config.spec.ts b/src/chai-config.spec.ts
new file mode 100644
index 00000000..005f22ae
--- /dev/null
+++ b/src/chai-config.spec.ts
@@ -0,0 +1,9 @@
+// Our local copy of Chai, with configuration options specified.
+//
+//   import { expect } from './chai-config.spec';
+//
+
+import * as chai from 'chai';
+export = chai;
+
+chai.config.truncateThreshold = 0;
diff --git a/src/diagnosticUtils.spec.ts b/src/diagnosticUtils.spec.ts
index 1f0f4cc5..e8360a37 100644
--- a/src/diagnosticUtils.spec.ts
+++ b/src/diagnosticUtils.spec.ts
@@ -1,5 +1,5 @@
 
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import * as diagnosticUtils from './diagnosticUtils';
 import { Range, DiagnosticSeverity } from 'vscode-languageserver';
 import { util } from './util';
diff --git a/src/files/BrsFile.Class.spec.ts b/src/files/BrsFile.Class.spec.ts
index 02226a92..fe20ee67 100644
--- a/src/files/BrsFile.Class.spec.ts
+++ b/src/files/BrsFile.Class.spec.ts
@@ -2,7 +2,7 @@ import * as sinonImport from 'sinon';
 
 import { Program } from '../Program';
 import type { BrsFile } from './BrsFile';
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import { DiagnosticMessages } from '../DiagnosticMessages';
 import { Range } from 'vscode-languageserver';
 import { ParseMode } from '../parser/Parser';
diff --git a/src/files/BrsFile.spec.ts b/src/files/BrsFile.spec.ts
index cd0e64d5..d089a59e 100644
--- a/src/files/BrsFile.spec.ts
+++ b/src/files/BrsFile.spec.ts
@@ -1,4 +1,4 @@
-import { assert, expect } from 'chai';
+import { assert, expect } from '../chai-config.spec';
 import * as sinonImport from 'sinon';
 import { CompletionItemKind, Position, Range } from 'vscode-languageserver';
 import type { Callable, CommentFlag, VariableDeclaration } from '../interfaces';
diff --git a/src/files/XmlFile.spec.ts b/src/files/XmlFile.spec.ts
index a1332902..610a9e50 100644
--- a/src/files/XmlFile.spec.ts
+++ b/src/files/XmlFile.spec.ts
@@ -1,4 +1,4 @@
-import { assert, expect } from 'chai';
+import { assert, expect } from '../chai-config.spec';
 import * as path from 'path';
 import * as sinonImport from 'sinon';
 import type { CompletionItem } from 'vscode-languageserver';
diff --git a/src/globalCallables.spec.ts b/src/globalCallables.spec.ts
index bc66337d..aae6160d 100644
--- a/src/globalCallables.spec.ts
+++ b/src/globalCallables.spec.ts
@@ -2,7 +2,7 @@ import { util } from './util';
 import { Program } from './Program';
 import { expectDiagnostics, expectZeroDiagnostics, rootDir, stagingDir } from './testHelpers.spec';
 import { DiagnosticMessages } from './DiagnosticMessages';
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 
 describe('globalCallables', () => {
     let program: Program;
diff --git a/src/lexer/Character.spec.ts b/src/lexer/Character.spec.ts
index 946339f5..4fd9ea3e 100644
--- a/src/lexer/Character.spec.ts
+++ b/src/lexer/Character.spec.ts
@@ -1,4 +1,4 @@
-import { assert } from 'chai';
+import { assert } from '../chai-config.spec';
 
 import * as Characters from './Characters';
 
diff --git a/src/lexer/Lexer.spec.ts b/src/lexer/Lexer.spec.ts
index 33e525d7..721f0925 100644
--- a/src/lexer/Lexer.spec.ts
+++ b/src/lexer/Lexer.spec.ts
@@ -1,5 +1,5 @@
 /* eslint no-template-curly-in-string: 0 */
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { TokenKind } from './TokenKind';
 import { Lexer } from './Lexer';
diff --git a/src/parser/AstNode.spec.ts b/src/parser/AstNode.spec.ts
index 693237cd..329fa5ca 100644
--- a/src/parser/AstNode.spec.ts
+++ b/src/parser/AstNode.spec.ts
@@ -2,7 +2,7 @@ import { util } from '../util';
 import * as fsExtra from 'fs-extra';
 import { Program } from '../Program';
 import type { BrsFile } from '../files/BrsFile';
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import type { DottedGetExpression } from './Expression';
 import { expectZeroDiagnostics } from '../testHelpers.spec';
 import { tempDir, rootDir, stagingDir } from '../testHelpers.spec';
@@ -43,4 +43,3 @@ describe('Program', () => {
         });
     });
 });
-
diff --git a/src/parser/Parser.Class.spec.ts b/src/parser/Parser.Class.spec.ts
index 0197cba8..94e51928 100644
--- a/src/parser/Parser.Class.spec.ts
+++ b/src/parser/Parser.Class.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import { DiagnosticMessages } from '../DiagnosticMessages';
 import { TokenKind, AllowedLocalIdentifiers, AllowedProperties } from '../lexer/TokenKind';
 import { Lexer } from '../lexer/Lexer';
diff --git a/src/parser/Parser.spec.ts b/src/parser/Parser.spec.ts
index f5ffd096..ef1d50f8 100644
--- a/src/parser/Parser.spec.ts
+++ b/src/parser/Parser.spec.ts
@@ -1,4 +1,4 @@
-import { expect, assert } from 'chai';
+import { expect, assert } from '../chai-config.spec';
 import { Lexer } from '../lexer/Lexer';
 import { ReservedWords, TokenKind } from '../lexer/TokenKind';
 import type { AAMemberExpression } from './Expression';
diff --git a/src/parser/SGParser.spec.ts b/src/parser/SGParser.spec.ts
index 352e92c1..22f7f451 100644
--- a/src/parser/SGParser.spec.ts
+++ b/src/parser/SGParser.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import { Range } from 'vscode-languageserver';
 import { DiagnosticMessages } from '../DiagnosticMessages';
 import { expectZeroDiagnostics, trim } from '../testHelpers.spec';
diff --git a/src/parser/Statement.spec.ts b/src/parser/Statement.spec.ts
index 2bb11875..ba5a2262 100644
--- a/src/parser/Statement.spec.ts
+++ b/src/parser/Statement.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import type { NamespaceStatement } from './Statement';
 import { Body, CommentStatement, EmptyStatement } from './Statement';
 import { ParseMode, Parser } from './Parser';
diff --git a/src/preprocessor/Manifest.spec.ts b/src/preprocessor/Manifest.spec.ts
index 0d7253b9..cf9e472e 100644
--- a/src/preprocessor/Manifest.spec.ts
+++ b/src/preprocessor/Manifest.spec.ts
@@ -1,5 +1,5 @@
 import * as fsExtra from 'fs';
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import { getManifest, getBsConst, parseManifest } from './Manifest';
 import { createSandbox } from 'sinon';
 import { expectThrows, mapToObject, objectToMap, trim } from '../testHelpers.spec';
diff --git a/src/preprocessor/Preprocessor.spec.ts b/src/preprocessor/Preprocessor.spec.ts
index b31d6b9f..dc7be565 100644
--- a/src/preprocessor/Preprocessor.spec.ts
+++ b/src/preprocessor/Preprocessor.spec.ts
@@ -2,7 +2,7 @@ import { identifier, token, EOF } from '../parser/tests/Parser.spec';
 import { TokenKind } from '../lexer/TokenKind';
 import { Preprocessor } from './Preprocessor';
 import { BrightScriptChunk, DeclarationChunk, ErrorChunk, HashIfStatement } from './Chunk';
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import { createSandbox } from 'sinon';
 let sinon = createSandbox();
 
diff --git a/src/preprocessor/PreprocessorParser.spec.ts b/src/preprocessor/PreprocessorParser.spec.ts
index ce14fad0..7111fe6d 100644
--- a/src/preprocessor/PreprocessorParser.spec.ts
+++ b/src/preprocessor/PreprocessorParser.spec.ts
@@ -1,7 +1,7 @@
 import { PreprocessorParser } from './PreprocessorParser';
 import { identifier, token } from '../parser/tests/Parser.spec';
 import { TokenKind } from '../lexer/TokenKind';
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import type { BrightScriptChunk } from './Chunk';
 
 describe('preprocessor parser', () => {
diff --git a/src/types/ArrayType.spec.ts b/src/types/ArrayType.spec.ts
index 95a5be20..f3bc305e 100644
--- a/src/types/ArrayType.spec.ts
+++ b/src/types/ArrayType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { ArrayType } from './ArrayType';
 import { DynamicType } from './DynamicType';
diff --git a/src/types/BooleanType.spec.ts b/src/types/BooleanType.spec.ts
index e14b3454..8d14a406 100644
--- a/src/types/BooleanType.spec.ts
+++ b/src/types/BooleanType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { BooleanType } from './BooleanType';
 import { DynamicType } from './DynamicType';
diff --git a/src/types/DoubleType.spec.ts b/src/types/DoubleType.spec.ts
index db503743..bc518545 100644
--- a/src/types/DoubleType.spec.ts
+++ b/src/types/DoubleType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { DoubleType } from './DoubleType';
 import { DynamicType } from './DynamicType';
diff --git a/src/types/DynamicType.spec.ts b/src/types/DynamicType.spec.ts
index 74480824..19d64d6e 100644
--- a/src/types/DynamicType.spec.ts
+++ b/src/types/DynamicType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { DynamicType } from './DynamicType';
 import { StringType } from './StringType';
diff --git a/src/types/FloatType.spec.ts b/src/types/FloatType.spec.ts
index f79d0d63..b6f39b69 100644
--- a/src/types/FloatType.spec.ts
+++ b/src/types/FloatType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { DynamicType } from './DynamicType';
 import { FloatType } from './FloatType';
diff --git a/src/types/FunctionType.spec.ts b/src/types/FunctionType.spec.ts
index 463a9589..4617e7d7 100644
--- a/src/types/FunctionType.spec.ts
+++ b/src/types/FunctionType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { DynamicType } from './DynamicType';
 import { FunctionType } from './FunctionType';
diff --git a/src/types/IntegerType.spec.ts b/src/types/IntegerType.spec.ts
index 73560af6..b9353c24 100644
--- a/src/types/IntegerType.spec.ts
+++ b/src/types/IntegerType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { DynamicType } from './DynamicType';
 import { IntegerType } from './IntegerType';
diff --git a/src/types/InterfaceType.spec.ts b/src/types/InterfaceType.spec.ts
index 9a174ae6..857147e5 100644
--- a/src/types/InterfaceType.spec.ts
+++ b/src/types/InterfaceType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 import { assert } from 'sinon';
 import { objectToMap } from '../testHelpers.spec';
 import type { BscType } from './BscType';
diff --git a/src/types/InvalidType.spec.ts b/src/types/InvalidType.spec.ts
index b80117e8..aea20cb0 100644
--- a/src/types/InvalidType.spec.ts
+++ b/src/types/InvalidType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { DynamicType } from './DynamicType';
 import { InvalidType } from './InvalidType';
diff --git a/src/types/LongIntegerType.spec.ts b/src/types/LongIntegerType.spec.ts
index 2b2b7cd0..974ecc21 100644
--- a/src/types/LongIntegerType.spec.ts
+++ b/src/types/LongIntegerType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { DynamicType } from './DynamicType';
 import { LongIntegerType } from './LongIntegerType';
diff --git a/src/types/ObjectType.spec.ts b/src/types/ObjectType.spec.ts
index 2fc1a9cc..cff94e67 100644
--- a/src/types/ObjectType.spec.ts
+++ b/src/types/ObjectType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { DynamicType } from './DynamicType';
 import { ObjectType } from './ObjectType';
diff --git a/src/types/StringType.spec.ts b/src/types/StringType.spec.ts
index fc0a12c1..e5e65621 100644
--- a/src/types/StringType.spec.ts
+++ b/src/types/StringType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { DynamicType } from './DynamicType';
 import { StringType } from './StringType';
diff --git a/src/types/VoidType.spec.ts b/src/types/VoidType.spec.ts
index 3578e840..b333183e 100644
--- a/src/types/VoidType.spec.ts
+++ b/src/types/VoidType.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../chai-config.spec';
 
 import { DynamicType } from './DynamicType';
 import { VoidType } from './VoidType';
diff --git a/src/util.spec.ts b/src/util.spec.ts
index 81b7eee5..bc59518f 100644
--- a/src/util.spec.ts
+++ b/src/util.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import * as path from 'path';
 import util, { standardizePath as s } from './util';
 import { Position, Range } from 'vscode-languageserver';


Test patch:
diff --git a/src/files/tests/imports.spec.ts b/src/files/tests/imports.spec.ts
index dd703ea4..2c2af965 100644
--- a/src/files/tests/imports.spec.ts
+++ b/src/files/tests/imports.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../chai-config.spec';
 import * as sinonImport from 'sinon';
 import * as fsExtra from 'fs-extra';
 import { DiagnosticMessages } from '../../DiagnosticMessages';
diff --git a/src/parser/tests/controlFlow/For.spec.ts b/src/parser/tests/controlFlow/For.spec.ts
index 1a6dc4e4..0130b76d 100644
--- a/src/parser/tests/controlFlow/For.spec.ts
+++ b/src/parser/tests/controlFlow/For.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
 import { EOF, identifier, token } from '../Parser.spec';
diff --git a/src/parser/tests/controlFlow/ForEach.spec.ts b/src/parser/tests/controlFlow/ForEach.spec.ts
index 6850a08a..a340992f 100644
--- a/src/parser/tests/controlFlow/ForEach.spec.ts
+++ b/src/parser/tests/controlFlow/ForEach.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/controlFlow/If.spec.ts b/src/parser/tests/controlFlow/If.spec.ts
index 6720222c..30eea60e 100644
--- a/src/parser/tests/controlFlow/If.spec.ts
+++ b/src/parser/tests/controlFlow/If.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import * as assert from 'assert';
 import { Parser } from '../../Parser';
 import { Lexer } from '../../../lexer/Lexer';
diff --git a/src/parser/tests/controlFlow/While.spec.ts b/src/parser/tests/controlFlow/While.spec.ts
index e3afb28c..c8593028 100644
--- a/src/parser/tests/controlFlow/While.spec.ts
+++ b/src/parser/tests/controlFlow/While.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/expression/Additive.spec.ts b/src/parser/tests/expression/Additive.spec.ts
index b19c6cdc..d68242a1 100644
--- a/src/parser/tests/expression/Additive.spec.ts
+++ b/src/parser/tests/expression/Additive.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/expression/ArrayLiterals.spec.ts b/src/parser/tests/expression/ArrayLiterals.spec.ts
index f52e90ca..8bc2b487 100644
--- a/src/parser/tests/expression/ArrayLiterals.spec.ts
+++ b/src/parser/tests/expression/ArrayLiterals.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/expression/AssociativeArrayLiterals.spec.ts b/src/parser/tests/expression/AssociativeArrayLiterals.spec.ts
index 6be4efff..56c48776 100644
--- a/src/parser/tests/expression/AssociativeArrayLiterals.spec.ts
+++ b/src/parser/tests/expression/AssociativeArrayLiterals.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/expression/Boolean.spec.ts b/src/parser/tests/expression/Boolean.spec.ts
index cd7fa71d..d7d18ac9 100644
--- a/src/parser/tests/expression/Boolean.spec.ts
+++ b/src/parser/tests/expression/Boolean.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/expression/Call.spec.ts b/src/parser/tests/expression/Call.spec.ts
index 3f21c0e1..3d238dc2 100644
--- a/src/parser/tests/expression/Call.spec.ts
+++ b/src/parser/tests/expression/Call.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { Lexer } from '../../../lexer/Lexer';
diff --git a/src/parser/tests/expression/Exponential.spec.ts b/src/parser/tests/expression/Exponential.spec.ts
index d2867f56..14248e2d 100644
--- a/src/parser/tests/expression/Exponential.spec.ts
+++ b/src/parser/tests/expression/Exponential.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/expression/Function.spec.ts b/src/parser/tests/expression/Function.spec.ts
index c8c822dd..fd5a8567 100644
--- a/src/parser/tests/expression/Function.spec.ts
+++ b/src/parser/tests/expression/Function.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/expression/Indexing.spec.ts b/src/parser/tests/expression/Indexing.spec.ts
index 8765b913..0a606aa9 100644
--- a/src/parser/tests/expression/Indexing.spec.ts
+++ b/src/parser/tests/expression/Indexing.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/expression/Multiplicative.spec.ts b/src/parser/tests/expression/Multiplicative.spec.ts
index b0e808c2..d566b501 100644
--- a/src/parser/tests/expression/Multiplicative.spec.ts
+++ b/src/parser/tests/expression/Multiplicative.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/expression/NullCoalescenceExpression.spec.ts b/src/parser/tests/expression/NullCoalescenceExpression.spec.ts
index fafc0668..88ea8145 100644
--- a/src/parser/tests/expression/NullCoalescenceExpression.spec.ts
+++ b/src/parser/tests/expression/NullCoalescenceExpression.spec.ts
@@ -1,5 +1,5 @@
 /* eslint-disable @typescript-eslint/no-for-in-array */
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import { DiagnosticMessages } from '../../../DiagnosticMessages';
 import { Lexer } from '../../../lexer/Lexer';
 import { Parser, ParseMode } from '../../Parser';
diff --git a/src/parser/tests/expression/PrefixUnary.spec.ts b/src/parser/tests/expression/PrefixUnary.spec.ts
index 91feef68..7f852977 100644
--- a/src/parser/tests/expression/PrefixUnary.spec.ts
+++ b/src/parser/tests/expression/PrefixUnary.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/expression/Primary.spec.ts b/src/parser/tests/expression/Primary.spec.ts
index 2543d1f2..23e80751 100644
--- a/src/parser/tests/expression/Primary.spec.ts
+++ b/src/parser/tests/expression/Primary.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/expression/Relational.spec.ts b/src/parser/tests/expression/Relational.spec.ts
index 52c5d00e..a7f5dccc 100644
--- a/src/parser/tests/expression/Relational.spec.ts
+++ b/src/parser/tests/expression/Relational.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/expression/TemplateStringExpression.spec.ts b/src/parser/tests/expression/TemplateStringExpression.spec.ts
index 35461a24..12a08200 100644
--- a/src/parser/tests/expression/TemplateStringExpression.spec.ts
+++ b/src/parser/tests/expression/TemplateStringExpression.spec.ts
@@ -1,7 +1,7 @@
 /* eslint-disable @typescript-eslint/no-for-in-array */
 /* eslint no-template-curly-in-string: 0 */
 
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import { DiagnosticMessages } from '../../../DiagnosticMessages';
 import { Lexer } from '../../../lexer/Lexer';
 import { Parser, ParseMode } from '../../Parser';
diff --git a/src/parser/tests/expression/TernaryExpression.spec.ts b/src/parser/tests/expression/TernaryExpression.spec.ts
index 8ef777bd..c1426506 100644
--- a/src/parser/tests/expression/TernaryExpression.spec.ts
+++ b/src/parser/tests/expression/TernaryExpression.spec.ts
@@ -1,5 +1,5 @@
 /* eslint-disable @typescript-eslint/no-for-in-array */
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import { DiagnosticMessages } from '../../../DiagnosticMessages';
 import { TokenKind } from '../../../lexer/TokenKind';
 import { Parser, ParseMode } from '../../Parser';
diff --git a/src/parser/tests/statement/AssignmentOperators.spec.ts b/src/parser/tests/statement/AssignmentOperators.spec.ts
index d975cf00..9c66abac 100644
--- a/src/parser/tests/statement/AssignmentOperators.spec.ts
+++ b/src/parser/tests/statement/AssignmentOperators.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/statement/ConstStatement.spec.ts b/src/parser/tests/statement/ConstStatement.spec.ts
index 0af475f1..89e93270 100644
--- a/src/parser/tests/statement/ConstStatement.spec.ts
+++ b/src/parser/tests/statement/ConstStatement.spec.ts
@@ -3,7 +3,7 @@ import { util } from '../../../util';
 import { Program } from '../../../Program';
 import { createSandbox } from 'sinon';
 import { ParseMode, Parser } from '../../Parser';
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import type { ConstStatement } from '../../Statement';
 import { TokenKind } from '../../../lexer/TokenKind';
 import { LiteralExpression } from '../../Expression';
diff --git a/src/parser/tests/statement/Continue.spec.ts b/src/parser/tests/statement/Continue.spec.ts
index 67e43e00..099b8aa6 100644
--- a/src/parser/tests/statement/Continue.spec.ts
+++ b/src/parser/tests/statement/Continue.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import { createSandbox } from 'sinon';
 import { isContinueStatement } from '../../../astUtils/reflection';
 import { DiagnosticMessages } from '../../../DiagnosticMessages';
diff --git a/src/parser/tests/statement/Declaration.spec.ts b/src/parser/tests/statement/Declaration.spec.ts
index 106a4586..52987967 100644
--- a/src/parser/tests/statement/Declaration.spec.ts
+++ b/src/parser/tests/statement/Declaration.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/statement/Dim.spec.ts b/src/parser/tests/statement/Dim.spec.ts
index 3eb898a0..5c9b474f 100644
--- a/src/parser/tests/statement/Dim.spec.ts
+++ b/src/parser/tests/statement/Dim.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import type { DimStatement } from '../../Statement';
 import { DiagnosticMessages } from '../../../DiagnosticMessages';
 import { Parser } from '../../Parser';
diff --git a/src/parser/tests/statement/Enum.spec.ts b/src/parser/tests/statement/Enum.spec.ts
index 1eb5ba8e..682f1f1b 100644
--- a/src/parser/tests/statement/Enum.spec.ts
+++ b/src/parser/tests/statement/Enum.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import { LiteralExpression } from '../../Expression';
 import { DiagnosticMessages } from '../../../DiagnosticMessages';
 import { expectCompletionsExcludes, expectCompletionsIncludes, expectDiagnostics, expectInstanceOf, expectZeroDiagnostics, getTestTranspile, trim } from '../../../testHelpers.spec';
diff --git a/src/parser/tests/statement/Function.spec.ts b/src/parser/tests/statement/Function.spec.ts
index d1565ebf..1208229b 100644
--- a/src/parser/tests/statement/Function.spec.ts
+++ b/src/parser/tests/statement/Function.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { Lexer } from '../../../lexer/Lexer';
diff --git a/src/parser/tests/statement/Goto.spec.ts b/src/parser/tests/statement/Goto.spec.ts
index 4ad6ea1f..96bdad21 100644
--- a/src/parser/tests/statement/Goto.spec.ts
+++ b/src/parser/tests/statement/Goto.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { Lexer } from '../../../lexer/Lexer';
diff --git a/src/parser/tests/statement/Increment.spec.ts b/src/parser/tests/statement/Increment.spec.ts
index b1d0f11f..f4d80222 100644
--- a/src/parser/tests/statement/Increment.spec.ts
+++ b/src/parser/tests/statement/Increment.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/statement/LibraryStatement.spec.ts b/src/parser/tests/statement/LibraryStatement.spec.ts
index 615a733c..f506b796 100644
--- a/src/parser/tests/statement/LibraryStatement.spec.ts
+++ b/src/parser/tests/statement/LibraryStatement.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { Lexer } from '../../../lexer/Lexer';
diff --git a/src/parser/tests/statement/Misc.spec.ts b/src/parser/tests/statement/Misc.spec.ts
index 0d78de96..066b080a 100644
--- a/src/parser/tests/statement/Misc.spec.ts
+++ b/src/parser/tests/statement/Misc.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import { Parser } from '../../Parser';
 import { Lexer } from '../../../lexer/Lexer';
 import { DisallowedLocalIdentifiersText, TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/statement/PrintStatement.spec.ts b/src/parser/tests/statement/PrintStatement.spec.ts
index 2ee30f2b..4e8a172c 100644
--- a/src/parser/tests/statement/PrintStatement.spec.ts
+++ b/src/parser/tests/statement/PrintStatement.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
 import { EOF, token } from '../Parser.spec';
diff --git a/src/parser/tests/statement/ReturnStatement.spec.ts b/src/parser/tests/statement/ReturnStatement.spec.ts
index e40bc241..fe1563f9 100644
--- a/src/parser/tests/statement/ReturnStatement.spec.ts
+++ b/src/parser/tests/statement/ReturnStatement.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/statement/Set.spec.ts b/src/parser/tests/statement/Set.spec.ts
index 5b871519..e52797d9 100644
--- a/src/parser/tests/statement/Set.spec.ts
+++ b/src/parser/tests/statement/Set.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { TokenKind } from '../../../lexer/TokenKind';
diff --git a/src/parser/tests/statement/Stop.spec.ts b/src/parser/tests/statement/Stop.spec.ts
index 2a64a1e6..c43cc634 100644
--- a/src/parser/tests/statement/Stop.spec.ts
+++ b/src/parser/tests/statement/Stop.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 
 import { Parser } from '../../Parser';
 import { Lexer } from '../../../lexer/Lexer';
diff --git a/src/parser/tests/statement/Throw.spec.ts b/src/parser/tests/statement/Throw.spec.ts
index e10afe78..4f970ae3 100644
--- a/src/parser/tests/statement/Throw.spec.ts
+++ b/src/parser/tests/statement/Throw.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import type { TryCatchStatement, ThrowStatement } from '../../Statement';
 import { DiagnosticMessages } from '../../../DiagnosticMessages';
 import { LiteralExpression } from '../../Expression';
diff --git a/src/parser/tests/statement/TryCatch.spec.ts b/src/parser/tests/statement/TryCatch.spec.ts
index 3b8ffd65..b7b237f7 100644
--- a/src/parser/tests/statement/TryCatch.spec.ts
+++ b/src/parser/tests/statement/TryCatch.spec.ts
@@ -1,4 +1,4 @@
-import { expect } from 'chai';
+import { expect } from '../../../chai-config.spec';
 import { Parser } from '../../Parser';
 import { TryCatchStatement } from '../../Statement';
 
diff --git a/src/testHelpers.spec.ts b/src/testHelpers.spec.ts
index 95785d41..77fd4276 100644
--- a/src/testHelpers.spec.ts
+++ b/src/testHelpers.spec.ts
@@ -3,7 +3,7 @@ import * as assert from 'assert';
 import chalk from 'chalk';
 import type { CodeDescription, CompletionItem, Diagnostic, DiagnosticRelatedInformation, DiagnosticSeverity, DiagnosticTag, integer, Range } from 'vscode-languageserver';
 import { createSandbox } from 'sinon';
-import { expect } from 'chai';
+import { expect } from './chai-config.spec';
 import type { CodeActionShorthand } from './CodeActionUtil';
 import { codeActionUtil } from './CodeActionUtil';
 import type { BrsFile } from './files/BrsFile';