diff --git a/src/commands/runModel.ts b/src/commands/runModel.ts index 3ca6fd736..c6dad5d7f 100644 --- a/src/commands/runModel.ts +++ b/src/commands/runModel.ts @@ -15,6 +15,15 @@ export class RunModel { return; } const fullPath = window.activeTextEditor.document.uri; + + // Check if the file is in the tests directory (singular test) + const relativePath = fullPath.fsPath; + if (relativePath.includes('/tests/') || relativePath.includes('\\tests\\')) { + // This is a singular test file, run it as a test instead of a model + this.runDBTModelTest(fullPath); + return; + } + this.runDBTModel(fullPath, type); }