alfy-testx

0.3.3 • Public • Published

npm-verison

Test your Alfy workflows,Few changes have been made to alfy-test to support entry file or keyword, so that we can test multiple workflow inside one package.

Install

$ npm install --save-dev alfy-testx

Usage

import test from 'ava'
import alfyTest from 'alfy-testx'
 
// const keyword = 'keyword'
const entry = 'path/main.js'
test(async t => {
  const alfy = alfyTest({ entry, keyword })
  const result = await alfy('workflow input')
 
  t.deepEqual(result, [
    {
      title: 'foo',
      subtitle: 'bar'
    }
  ])
})

API

alfyTest([options])

Returns an alfy instance.

options

entry

Type: string

The entry file of workflow

keyword

Type: string

The keyword of workflow

version

Type: string
Default: 3.8.1

Alfred version.

theme

Type: string
Default: theme.urlimport.153A3C58-B2D9-4F08-B342-B0BF7F6E8DE9

Alfred theme.

theme_background

Type: string
Default: rgba(252,254,255,0.85)

Background color.

theme_selection

Type: string
Default: rgba(255,255,255,0.26)

Background color of a selected item.

theme_subtext

Type: string
Default: 1

Show the item subtitle.

alfy(...input)

Returns a Promise that returns the items of the workflow.

input

Type: string[]

Workflow input.

.config

The alfy config instance.

.cache

The alfy cache instance.

Examples

License

MIT © zxing

Package Sidebar

Install

npm i alfy-testx

Weekly Downloads

1

Version

0.3.3

License

MIT

Unpacked Size

6.65 kB

Total Files

6

Last publish

Collaborators

  • feminer