I'm looking for ways to pass arguments to my ava test file via command line and I found this documentation. https://github.com/avajs/ava/blob/main/docs/recipes/passing-arguments-to-your-test-files.md
// test.js const test = require('ava');
test('argv', t => {
t.deepEqual(process.argv.slice(2), ['--hello', 'world']);
});
$ npx ava -- --hello world
I was wondering that what this code is actually doing but I can't find other related topic online talking about this. Is there anyone who can explain to me?