Giter Site home page Giter Site logo

Comments (14)

maty21 avatar maty21 commented on August 30, 2024 1

found the issue
im creating object tree that represent the suits
the problem is that im creating object with test property (not the best idea need to change it to uniuqe name)
so for your problem you have test in fronend/index.spec.js

describe("test", function () {
});

as a workaround change the test to something else

from mocha-sidebar.

rosesonfire avatar rosesonfire commented on August 30, 2024 1

Thanks, that did the trick! I changed the name of my test from "test" to something else and it is working now.

from mocha-sidebar.

maty21 avatar maty21 commented on August 30, 2024 1

fixed for version 0.10.16 (checked also in your code :))
the problem was that for some reason the code was not published to the marketplace

from mocha-sidebar.

rosesonfire avatar rosesonfire commented on August 30, 2024 1

I updated Mocha Sidebar again, and it is working fine now. Thanks!

from mocha-sidebar.

maty21 avatar maty21 commented on August 30, 2024

Do you have something in this path
'/home/user/dir1/dir2/dir3/undefined
It's seems like that you referencing to wrong path
Is it run successfully when you running mocha from command line

from mocha-sidebar.

rosesonfire avatar rosesonfire commented on August 30, 2024

No I do not have anything in the path '/home/user/dir1/dir2/dir3/undefined'.
The path '/home/user/dir1/dir2/dir3' exists, but the path '/home/user/dir1/dir2/dir3/undefined' does not exist.'
It runs successfully when I run mocha from command line.
Also, I can run test suits individually from mocha-sidebar.

I use these configurations

  "mocha.options": {"bail": false, "fullTrace": true, "useColors": true, "useInlineDiffs": true },
  "mocha.files.glob": "dist/**/*.spec.js"

from mocha-sidebar.

maty21 avatar maty21 commented on August 30, 2024

from mocha-sidebar.

maty21 avatar maty21 commented on August 30, 2024

couldn't reproduce it on my pc with my tests , if you can upload not working sample it will be helpful tks

from mocha-sidebar.

rosesonfire avatar rosesonfire commented on August 30, 2024

You can clone/fork the project, and open it in vscode:
https://github.com/rosesonfire/react-try-out

And use this .vscode/settings.json

{
  "editor.tabSize": 2,
  "mocha.options": {"bail": false, "fullTrace": true, "useColors": true, "useInlineDiffs": true },
  "mocha.files.glob": "dist/**/*.spec.js"
}
  1. Then run:
npm install
  1. Then run the tests from command line. This runs successfully:
npm run test
  1. Then refresh the mocha-sidebar and the tests should be visible in the mocha-sidebar. Right click on the root (i.e. Tests) and click Run all tests. This triggers the exception in the output.
  2. However, if you right click on individual tests or test-suites, and click Run test or Run tests from this level, the corresponding test(s) run successfully.

Let me know if I am doing something wrong here.

from mocha-sidebar.

maty21 avatar maty21 commented on August 30, 2024

from mocha-sidebar.

maty21 avatar maty21 commented on August 30, 2024

please verify that its working for you without the workaround tks :)

from mocha-sidebar.

rosesonfire avatar rosesonfire commented on August 30, 2024

I updated the extension by uninstalling and then reinstalling it in vscode and tried again. I am afraid the exception was thrown again.

Test file(s):
  undefined
module.js:529
    throw err;
    ^

Error: Cannot find module '/home/user/dir1/dir2/dir3/undefined'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at /home/user/.vscode/extensions/maty.vscode-mocha-sidebar-0.10.14/node_modules/mocha/lib/mocha.js:220:27
    at Array.forEach ()
    at Mocha.loadFiles (/home/user/.vscode/extensions/maty.vscode-mocha-sidebar-0.10.14/node_modules/mocha/lib/mocha.js:217:14)
    at Mocha.run (/home/user/.vscode/extensions/maty.vscode-mocha-sidebar-0.10.14/node_modules/mocha/lib/mocha.js:469:10)
    at Object. (/home/user/.vscode/extensions/maty.vscode-mocha-sidebar-0.10.14/worker/runtest.js:57:7)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:201:16)

from mocha-sidebar.

maty21 avatar maty21 commented on August 30, 2024

from mocha-sidebar.

maty21 avatar maty21 commented on August 30, 2024

I'm closing the issue tks

from mocha-sidebar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.