1. arvish-test
Test your Arvish extensions
arvish-test
Package: arvish-test
Last modified: Mon, 11 Apr 2022 15:16:26 GMT
Version: 0.1.0
License: MIT
Downloads: 6

Install

npm install arvish-test
yarn add arvish-test

arvish-test

BuildStatus
NPM download total
NPM version
MIT license
PR's Welcome

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-test

Usage

 // 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.

  • arvish - Arvis workflow, plugin creator tools

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin