Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap function in plugin "users-permissions" failed #7671

Closed
adrianwix opened this issue Sep 1, 2020 · 2 comments
Closed

Bootstrap function in plugin "users-permissions" failed #7671

adrianwix opened this issue Sep 1, 2020 · 2 comments
Labels
status: duplicate Is a duplicate of another issue

Comments

@adrianwix
Copy link

adrianwix commented Sep 1, 2020

Hi, I am trying to do Unit Testing in Strapi. I am following the documentation but the test are not running. When trying to run the tests I get the following errors

[2020-09-01T10:46:51.491Z] error Bootstrap function in plugin "users-permissions" failed
[2020-09-01T10:46:51.492Z] error undefined
  ●  process.exit called with "1"

       7 |     if (!instance) {
       8 |         /** the following code in copied from `./node_modules/strapi/lib/Strapi.js` */
    >  9 |         await Strapi().load()
         |         ^
      10 |         instance = strapi // strapi is global now
      11 |         await instance.app
      12 |             .use(instance.router.routes()) // populate KOA routes

      at Strapi.stop (node_modules/strapi/lib/Strapi.js:263:13)
      at node_modules/strapi/lib/Strapi.js:391:16
          at async Promise.all (index 4)
      at Strapi.runBootstrapFunctions (node_modules/strapi/lib/Strapi.js:394:5)
      at Strapi.load (node_modules/strapi/lib/Strapi.js:326:5)
      at setupStrapi (tests/helpers/strapi.js:9:9)
      at Object.<anonymous> (tests/app.test.js:6:5)

Process finished with exit code 1

Steps to reproduce the behavior

  1. Install Strapi
  2. Follow the docs for unit testing until here
  3. yarn run test

Expected behavior
Test should be passing

Screenshots
If applicable, add screenshots to help explain your problem.

System

  • Node.js version: 12.16.1
  • NPM version: 6.13.4
  • Yarn version: 1.22.0
  • Strapi version: 3.1.4
  • Database: sqlite
  • sqlite3: 5.0.0
  • Operating system: Windows 10
  • Jest: 26.4.2
  • supertest: 4.0.2
@saulmmendoza
Copy link

same but on linux ubuntu, even when using gitlab CI with the strapi/base docker image

@derrickmehaffy derrickmehaffy added status: duplicate Is a duplicate of another issue and removed issue: help wanted labels Nov 18, 2020
@derrickmehaffy
Copy link
Member

duplicate: #7811

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate Is a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants