Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/string/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unit testing electron项目上docker卷文件夹的Ava和权限_Unit Testing_Electron_Ava - Fatal编程技术网

Unit testing electron项目上docker卷文件夹的Ava和权限

Unit testing electron项目上docker卷文件夹的Ava和权限,unit-testing,electron,ava,Unit Testing,Electron,Ava,我的项目包含在以下具有相应权限的文件中: -rw-r--r-- 1 pcmagas pcmagas 761 Νοέ 20 18:08 .compilerc -rw-rw-r-- 1 pcmagas pcmagas 1034 Νοέ 23 19:11 docker-compose.yml -rw-rw-r-- 1 pcmagas pcmagas 334 Νοέ 20 22:32 docker-entrypoint.sh -rw-rw-r-- 1 pcmagas

我的项目包含在以下具有相应权限的文件中:

-rw-r--r--   1 pcmagas pcmagas    761 Νοέ  20 18:08 .compilerc
-rw-rw-r--   1 pcmagas pcmagas   1034 Νοέ  23 19:11 docker-compose.yml
-rw-rw-r--   1 pcmagas pcmagas    334 Νοέ  20 22:32 docker-entrypoint.sh
-rw-rw-r--   1 pcmagas pcmagas    716 Νοέ  20 22:13 Dockerfile
-rw-rw-r--   1 pcmagas pcmagas     67 Νοέ  23 22:53 .dockerignore
drwxrwxr-x   2 pcmagas pcmagas   4096 Δεκ  28 18:55 dummy_src
-rw-r--r--   1 pcmagas pcmagas    216 Νοέ  20 18:05 .eslintrc
drwxrwxr-x   9 pcmagas pcmagas   4096 Δεκ  31 14:34 .git
-rw-r--r--   1 pcmagas pcmagas     35 Νοέ  23 22:53 .gitignore
-rw-rw-r--   1 pcmagas pcmagas    127 Νοέ  23 19:06 .gitmodules
drwxrwxr-x 686 pcmagas pcmagas  36864 Δεκ  31 14:34 node_modules
-rw-rw-r--   1 pcmagas pcmagas   1598 Δεκ  31 14:34 package.json
-rw-rw-r--   1 pcmagas pcmagas 308707 Δεκ  31 14:34 package-lock.json
drwxrwxr-x   4 pcmagas pcmagas   4096 Δεκ  30 17:58 src
drwxrwxr-x   3 pcmagas pcmagas   4096 Νοέ  23 19:06 submodules
drwxrwxr-x   2 pcmagas pcmagas   4096 Δεκ   9 15:38 test
-rw-rw-r--   1 pcmagas pcmagas    348 Δεκ   7 18:55 test.js
drwxr-xr-x   3 root    root      4096 Νοέ  23 19:13 volumes
drwxrwxr-x   2 pcmagas pcmagas   4096 Νοέ  23 21:43 .vscode
test
文件夹中,我有以下测试文件:

从ava进口测试

测试('true't=>{ t、 通过(“为使ava运行而进行的硬编码通过测试”) });

我根据:)和stackoverflow问题配置了ava:

但是,当我运行测试时,我得到以下错误:

> custom_xmpp@1.0.0 test /home/pcmagas/Kwdikas/master_thesis/custom_xmpp
> ava


⠋ glob error { [Error: EACCES: permission denied, scandir '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/__tests__/helpers']
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path:
   '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/__tests__/helpers' }
glob error { [Error: EACCES: permission denied, scandir '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/__tests__']
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path:
   '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/__tests__' }
glob error { [Error: EACCES: permission denied, scandir '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/test/helpers']
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path:
   '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/test/helpers' }
⠙ ✖ Internal errorglob error { [Error: EACCES: permission denied, scandir '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/test']
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path:
   '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/test' }


  ✖ Internal error
  Error: EACCES: permission denied, scandir '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/__tests__/helpers'
  Error: EACCES: permission denied, scandir '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/__tests__/helpers'
      at handlePaths (/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/node_modules/ava/lib/ava-files.js:13:18)
      at AvaFiles.findTestHelpers (/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/node_modules/ava/lib/ava-files.js:144:10)
      at emittedRun.then.then.precompilation (/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/node_modules/ava/api.js:151:9)

npm ERR! Test failed.  See above for more details.

我做错了什么?

不幸的是,AVA也在查找帮助文件。当前无法配置这些目录模式。但是,如果禁用AVA对测试和帮助文件的编译,问题应该会消失。看

> custom_xmpp@1.0.0 test /home/pcmagas/Kwdikas/master_thesis/custom_xmpp
> ava


⠋ glob error { [Error: EACCES: permission denied, scandir '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/__tests__/helpers']
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path:
   '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/__tests__/helpers' }
glob error { [Error: EACCES: permission denied, scandir '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/__tests__']
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path:
   '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/__tests__' }
glob error { [Error: EACCES: permission denied, scandir '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/test/helpers']
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path:
   '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/test/helpers' }
⠙ ✖ Internal errorglob error { [Error: EACCES: permission denied, scandir '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/test']
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path:
   '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/test' }


  ✖ Internal error
  Error: EACCES: permission denied, scandir '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/__tests__/helpers'
  Error: EACCES: permission denied, scandir '/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/volumes/openfire/__tests__/helpers'
      at handlePaths (/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/node_modules/ava/lib/ava-files.js:13:18)
      at AvaFiles.findTestHelpers (/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/node_modules/ava/lib/ava-files.js:144:10)
      at emittedRun.then.then.precompilation (/home/pcmagas/Kwdikas/master_thesis/custom_xmpp/node_modules/ava/api.js:151:9)

npm ERR! Test failed.  See above for more details.