-1

Issue is the following.

I try to setup "ava" testing for vuejs. I can't test directly, cause it is impossible to test single file components. Have found the following instruction: https://www.npmjs.com/package/vue-node

Created helper (setup.js):

const browserEnv = require('browser-env');
const hook = require('vue-node');
const { join } = require('path');

browserEnv();

hook(join(__dirname, 'webpack.config.test.js'));

And put it to the root folder.

Than in the package.json have put the following:

"ava": {
    "require": [
      "setup.js",
    ]
  }

But then I catch error:

Could not resolve required module 'setup.js'

I use laravel + vue. vue-node and browser-env have been also installed.

Cœur
  • 37,241
  • 25
  • 195
  • 267
ILya
  • 121
  • 1
  • 3
  • 14

1 Answers1

0

The problem was in the path: "./resources/assets/js/test/helpers/setup.js"

ILya
  • 121
  • 1
  • 3
  • 14