I'm running AVA test now and I have 3 positional arguments that will be passed when running the command. For example:
npm test <arg1> <arg2> <arg3>
But I wish to put the first 2 positional arguments inside packaga.json file so that I don't have to manually pass in 3 arguments whenever I run the test.
This is how my test script looks like in package.json file:
{
"scripts": {
"test": "ava -v --serial --timeout='2m'"
}
}
I tried this but it's not working:
{
"scripts": {
"test": "ava -v --serial --timeout='2m' -- -- <arg1> <arg2>"
}
}
npm test <arg3>
NOTE: The double '--' is used to separate the ava flags with the arguments. I found this from https://github.com/avajs/ava/blob/main/docs/recipes/passing-arguments-to-your-test-files.md
So, I'm wondering is it possible to achieve this?