SamVerschueren / alfy-test

Test your Alfy workflows
MIT License
21 stars 8 forks source link

Rejected promise returned by test. #8

Open dev99problems opened 4 years ago

dev99problems commented 4 years ago

Not sure this package is still maintained, but anyway would be thankful for any help. I tried to use it to test my workflow and find out, that any time I do

const test = require('ava')
const alfyTest = require('alfy-test')

test('lastSearchCache', async t => {
  const alfy = alfyTest()

  const input = await alfy('hello')
  t.pass()
})

ava throws an error like:

node_modules/alfy-test/index.js:41

Rejected promise returned by test. Reason:

SyntaxError {
  message: 'Unexpected end of JSON input',
}

TBH I cloned another project — alfred-firebase, installed deps and tried to run tests and got pretty similar error from ava/alfy-test.

Tech details:

sindresorhus commented 4 years ago

Can you try the latest version? https://github.com/SamVerschueren/alfy-test/releases/tag/v0.4.0

dev99problems commented 4 years ago

Thanks for quick response! With latest 0.4.0 version it still throws an error, but now it's different

  node_modules/alfy-test/index.js:40

  Rejected promise returned by test. Reason:

  AlfyTestError {
    result: '',
    message: 'Could not parse result as JSON',
  }
almai commented 1 year ago

I get the same error as soon as I update from version 0.3.0 to 0.4.0.

Is there any update on this issue?

My dependencies are: