Package Exports
- arvish-test
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (arvish-test) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
arvish-test
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.
Install
$ npm install --save-dev arvish-testUsage
// 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'
}
]);
});API
arvishTest(options?)
Returns an mock arvish instance.
options
Type: object
version
Type: string
Default: arvish-test
Arvis version.
env
Type: object\
You can put unsupported environment variables values through env
vars
Type: object\
You can put query or other variables vars
arvish(script)
Returns a Promise that returns the items of the workflow.
script
Type: string
Script to test.
.config
The arvish config instance.
.cache
The arvish cache instance.
Related
- arvish - Arvis workflow, plugin creator tools