Skip to content

Bug report: 'Debug Tests' pulls from config file #3180

@robdy

Description

@robdy

Description

While trying to debug tests from a specific file using 'Debug Tests' from launch.json file, all tests run.

Steps to reproduce

Change 'Debug Tests' args in launch.json to:

      "args": [
        "dist/**/aad/**/app-add.spec.js",
        "--timeout",
        "10000"
      ],

Expected results

Run only tests from m365/aad/commands/app/app-add.spec.ts.

Actual results

All tests run

Diagnostics

No response

CLI for Microsoft 365 version

"v5.0.0"

nodejs version

v16.14.2

Operating system (environment)

Linux

Shell

zsh

cli doctor

{
"os": {
"platform": "linux",
"version": "#75~18.04.1-Ubuntu SMP Wed Mar 2 14:41:08 UTC 2022",
"release": "5.4.0-1072-azure"
},
"cliVersion": "5.0.0",
"nodeVersion": "v16.14.2",
"cliAadAppId": "31359c7f-bd7e-475c-86db-fdb8c937548e",
"cliAadAppTenant": "common",
"authMode": "DeviceCode",
"cliEnvironment": "",
"cliConfig": {},
"roles": [],
"scopes": [
"AllSites.FullControl",
"AppCatalog.ReadWrite.All",
"ChannelMember.ReadWrite.All",
"ChannelMessage.Read.All",
"ChannelMessage.Send",
"ChannelSettings.ReadWrite.All",
"Chat.Read",
"Directory.AccessAsUser.All",
"Directory.ReadWrite.All",
"Group.ReadWrite.All",
"IdentityProvider.ReadWrite.All",
"Mail.ReadWrite",
"Mail.Send",
"Policy.Read.All",
"Reports.Read.All",
"ServiceMessage.Read.All",
"Tasks.ReadWrite",
"Team.Create",
"TeamMember.ReadWrite.All",
"TeamsApp.ReadWrite.All",
"TeamsAppInstallation.ReadWriteForUser",
"TeamSettings.ReadWrite.All",
"TeamsTab.ReadWrite.All",
"TermStore.ReadWrite.All",
"User.Invite.All",
"User.ReadWrite.All",
"profile",
"openid",
"email"
]
}

Additional Info

The issue started when Mocha Test Explorer was added. The PR #3024 introduced .mocharc.json file. Now, when I run 'Debug Tests' it pulls the config file.

Solution: add --no-config to the args array

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions