BotBuilder-Samples
BotBuilder-Samples copied to clipboard
Remove "npm test" from all templates
tl;dr all bot templates should not include an always-failing npm test script. It should work out of the box without any changes to any code.
Is your feature request related to a problem? Please describe.
I am trying to deploy a bot using Azure Web App Deployment Center. Here are my steps:
- Clone this repo
- Create a new repo, namely
my-bot - Copy
/samples/javascript_nodejs/02.echo-bot/recursively tomy-botrepo at root level - Commit
my-botto GitHub asmainbranch - Create a new Azure Web App Bot
- Enable automatic deployment from GitHub from
my-botrepo (in Azure Web App of the bot)- Behind the scene, Deployment Center just added a GitHub Actions YAML to
my-botrepo to do the deployment - Sample YML created by Azure Web App is here
- Behind the scene, Deployment Center just added a GitHub Actions YAML to
Then, it fail because the 02.echo-bot is trying to run npm run test --if-present, which failed.
> echo "Error: no test specified" && exit 1
"Error: no test specified"
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `echo "Error: no test specified" && exit 1`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Describe the solution you'd like
If 02.echo-bot doesn't come any test harness (e.g. Mocha/Jest), it should not include an always-failing "npm test" script.
Describe alternatives you've considered
- Add a simple Mocha test
- Remove it myself every time I clone the repo
Additional context
It is very reasonable for a CI/CD pipeline to run npm test to make sure the deployed bit looks okay. I think Azure Web App Deployment Center is doing it correctly by running npm test at deployment time.
Ping.
Old issue. But I think you mean the generators. These moved to JS, but appears to have been corrected there.