Test your arvish extensions
This lib is inspired and cloned from alfy-test.
If you're trying to use this lib, please note that API is different from alfy-test.
-
Some environment variables are not supported yet. You could check which envs is supported on here
-
XML scriptfilter not supported.
$ npm install --save-dev arvish-test
// Note: API is different from 'alfy-test'.
import test from 'ava';
import arvishTest from 'arvish-test';
test('foo', async t => {
const arvish = arvishTest({
vars: {
query: 'foo bar'
}
});
// Below script is replaced with "node index.js foo\\ bar"
const result = await arvish("node index.js {query}");
t.deepEqual(result, [
{
title: 'foo',
subtitle: 'bar'
}
]);
});
Returns an mock arvish instance.
Type: object
Type: string
Default: arvish-test
Arvis version.
Type: object
\
You can put unsupported environment variables values through env
Type: object
\
You can put query
or other variables vars
Returns a Promise
that returns the items
of the workflow.
Type: string
Script to test.
The arvish config instance.
The arvish cache instance.
- arvish - Arvis workflow, plugin creator tools