Giter VIP home page Giter VIP logo

jest-run-it's People

Contributors

micaelmbagira avatar nithinpeter avatar npeterat avatar ssteinvil-forescout avatar th0was14 avatar tinganho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jest-run-it's Issues

Don't work in Windows

I have this error when trying to run in windows

node_modules/.bin/jest 'c:\Users\<path-to-project>\src\some-file-name.spec.js' -t 'should get the right indexes for the add'
'node_modules' is not recognized as an internal or external command,
operable program or batch file.

Request: Add watch action

Would be nice to have a dedicated button/icon for a --watch action when you want to focus testing on a specific test.

Can be done with the cli options but you loose the ability to not watch this way.

Debugger attached. No tests found, exiting with code 1

My folder structure is:

projectroot 
--services
---serviceA
------unit-tests
--------handler.test.js
---serviceB
------unit-tests
--------handler.test.js

I am on windows and have enabled double quotes config.

When I try to run the debugger I get:


Debugger attached.
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\Users\SIKAU\projectroot
  107 files checked.
  testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 9 matches
  testPathIgnorePatterns: \\node_modules\\ - 107 matches
  testRegex:  - 0 matches
Pattern: c:\Users\SIK\projectroot\serviceA\tenant-service\unit-tests\handler.test.js - 0 matches 
Waiting for the debugger to disconnect...

I tried adding different patterns in settings.json for testMatchPatterns but it has not changed anything

Compatibility with ssh-remote?

Just wondering if anyone has tested this ext installed remotely via SSH: Remote?

I can't seem to get it to show me anything in the output panel, or anywhere else even when I configure it "correctly".

Looks cool though, nice project!

Problem with Windows restriction policies

Tried to run a single test and got the following:

node_modules\.bin\jest : File C:\Users\krzys\...\node_modules\.bin\jest.ps1 cannot be loaded because running scripts is disabled on this system. For more  
information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ node_modules\.bin\jest "c:/Users/krzys/Documents/...
+ ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

Show "update snapshot" icon?

Hi, I like your runner the best, but I never see the option to run with -u available through a click. Can I enable it somehow?

Activating extension 'vespa-dev-works.jestRunIt' failed: Cannot find module './jestDoItCodeLensProvider'

When I install the extension I get this:

Activating extension 'vespa-dev-works.jestRunIt' failed: Cannot find module './jestDoItCodeLensProvider'
Require stack:
- /home/capaj/.vscode/extensions/vespa-dev-works.jestrunit-0.4.0/out/extension.js
- /snap/code/48/usr/share/code/resources/app/out/vs/loader.js
- /snap/code/48/usr/share/code/resources/app/out/bootstrap-amd.js
- /snap/code/48/usr/share/code/resources/app/out/bootstrap-fork.js.

I am installing version v0.4.0

debugging on pnpm packager does not work

❯  /usr/bin/env 'NODE_OPTIONS=--require "/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/ms-vscode.js-debug/src/bootloader.bundle.js" --inspect-publish-uid=http' 'VSCODE_INSPECTOR_OPTIONS={"inspectorIpc":"/var/folders/nw/0tjfp_vs1zd25vgqgp0_7sww0000gn/T/node-cdp.59092-1.sock","deferredMode":false,"waitForDebugger":"","execPath":"/opt/homebrew/bin/node","onlyEntrypoint":false,"autoAttachMode":"always","fileCallback":"/var/folders/nw/0tjfp_vs1zd25vgqgp0_7sww0000gn/T/node-debug-callback-5926a02bc4546813"}' /opt/homebrew/bin/node ./node_modules/.bin/jest /Users/jahv/Documents/Projects/oak/identity-strategy-server/server/socket/ChecksumUtils.test.ts -t "shoud validateRequest\\(\\)" --runInBand 
Debugger attached.
Waiting for the debugger to disconnect...
/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/.bin/jest:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1031:15)
    at Module._compile (node:internal/modules/cjs/loader:1065:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at node:internal/main/run_main_module:17:47

./node_modules/.bin/jest content:

#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -z "$NODE_PATH" ]; then
  export NODE_PATH="/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/.pnpm/[email protected][email protected]/node_modules/jest/bin/node_modules:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/.pnpm/[email protected][email protected]/node_modules/jest/node_modules:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/.pnpm/[email protected][email protected]/node_modules:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/.pnpm/node_modules:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules:/Users/jahv/Documents/Projects/oak/node_modules:/Users/jahv/Documents/Projects/node_modules:/Users/jahv/Documents/node_modules:/Users/jahv/node_modules:/Users/node_modules:/node_modules:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/jest/bin/node_modules:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/jest/node_modules"
else
  export NODE_PATH="$NODE_PATH:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/.pnpm/[email protected][email protected]/node_modules/jest/bin/node_modules:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/.pnpm/[email protected][email protected]/node_modules/jest/node_modules:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/.pnpm/[email protected][email protected]/node_modules:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/.pnpm/node_modules:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules:/Users/jahv/Documents/Projects/oak/node_modules:/Users/jahv/Documents/Projects/node_modules:/Users/jahv/Documents/node_modules:/Users/jahv/node_modules:/Users/node_modules:/node_modules:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/jest/bin/node_modules:/Users/jahv/Documents/Projects/oak/identity-strategy-server/node_modules/jest/node_modules"
fi
if [ -x "$basedir/node" ]; then
  exec "$basedir/node"  "$basedir/../jest/bin/jest.js" "$@"
else
  exec node  "$basedir/../jest/bin/jest.js" "$@"
fi

can't run when test name has quotes in it

I had test a test like it("Can't decode", () => { and when I try to run I see this in terminal

$ node_modules/.bin/jest '/Users/safareli/dev/project/test/codec\.spec\.ts' -t 'Can\'t decode'
quote>

Buttons disapear with nested describes

Hello,
This works fine

  describe('Method1', () => {
    test('xxxx', () => {
     ....
    });
  });
  describe('Method2', () => {
    test('yyyy', () => {
      .....
    });

    test('zzzzzz', () => {
      ...
    });
  });

But if I add a surronding describe for the class name, the buttons to launch the tests disapear (above each describe and each test)

describe('ClassName', () => {
  describe('Method1', () => {
    test('xxxx', () => {
     ....
    });
  });
  describe('Method2', () => {
    test('yyyy', () => {
      .....
    });

    test('zzzzzz', () => {
      ...
    });
  });
});

Extra escaped quotes in -t command option when debugging

The debugging command does not work because the -t option adds up a pair of escaped quotes for the test name. So instead of launching:

node_modules/jest/bin/jest.js mytestFile.test.js -t "mytest" -c ....

the debug command is launched using this:

node_modules/jest/bin/jest.js mytestFile.test.js -t "\'mytest\'" -c ....

When the test is defined this way:

test('mytest', () =>{ ... })

And the test is skipped.

Request: Add option to clear terminal before a test runs

Thanks for providing this extension. I really like that you've made the UI customizable (e.g. allowing for users to use their own labels).

Can you add an option to clear the terminal before running the next test ...or as a more reusable option, allow users to send CLI commands before the main logic runs?

Something like terminal.sendText(`${preCommand}; ${command}`);
That way we can do things like clear; jest...

Wrong filename on out/JestDoItCodeLensProvider folder

VS Code was complaining with the extension, because it couldn't find the file:

.vscode-server/extensions/vespa-dev-works.jestrunit-0.4.0/out/jestDoItCodeLensProvider.js

I took a look and actually the file was on upperCase! JestDoItCodeLensProvider.js. I fixed it by just changing the name to lowerCase.

How to get debug working with create-react-app [question]

Question- how do you get debug working with create-react-app repos?

I've got the Run command working by setting the Jest Run It: Jest Path to node_modules/.bin/react-scripts test, but this only works for Run, not Debug.

Debug outputs this error:

Debugger listening on ws://127.0.0.1:52155/67198ca8-c598-45d0-9f63-25dd372716a6
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect...
internal/modules/cjs/loader.js:1032
  throw err;
  ^

Error: Cannot find module '/Users/cathrync/gitlab/my-project/node_modules/.bin/react-scripts test'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15)
    at Function.Module._load (internal/modules/cjs/loader.js:898:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

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.