GithubHelp home page GithubHelp logo

Comments (16)

linux-china avatar linux-china commented on June 15, 2024 1

It works now? I opened vitest repository, and it works well with examples sub projects.

image

from vitest-jetbrains-plugin.

linux-china avatar linux-china commented on June 15, 2024

Could you try this version? If all is good and I will release a new version.
vitest-jetbrains-plugin-0.2.2.zip

from vitest-jetbrains-plugin.

oooplz avatar oooplz commented on June 15, 2024

@linux-china Not work. And the click icon disappeared when using the new install file.

from vitest-jetbrains-plugin.

linux-china avatar linux-china commented on June 15, 2024

@iamanewofkotlin could you share your demo project on github?

from vitest-jetbrains-plugin.

oooplz avatar oooplz commented on June 15, 2024

@iamanewofkotlin I am sorry for this, I can not. It is a monorepo. Just like vueuse.
But i installing the vites in packages/foo dir that is a subproject.
Could you understanding my mean

from vitest-jetbrains-plugin.

linux-china avatar linux-china commented on June 15, 2024

Some weird, and it works well on webstorm. You project alike following structure?

image

could you install this version to test again? If it does not work, could you help me to create a demo project and attach it?
vitest-jetbrains-plugin-0.2.2.zip

from vitest-jetbrains-plugin.

linux-china avatar linux-china commented on June 15, 2024

Now the plugin does not support Vitest with tsconfig.json, and you should use import { assert, expect, test } from 'vitest'.

// tsconfig.json
{
  "compilerOptions": {
    "types": ["vitest/globals"]
  }
}

from vitest-jetbrains-plugin.

oooplz avatar oooplz commented on June 15, 2024

@linux-china Pardon. Maybe restarting my webstorm or reinstalling vitest to my monorepo root dir can resolve the issue. Thanks for your replying.

I will move vitest to my monorepo root dir.

from vitest-jetbrains-plugin.

linux-china avatar linux-china commented on June 15, 2024

the click icon disappeared when using the new install file.

You are using Windows? Adjust logic for Windows path match. Please install new version and restart WebStorm and try it again.

vitest-jetbrains-plugin-0.2.2.zip

from vitest-jetbrains-plugin.

oooplz avatar oooplz commented on June 15, 2024

@linux-china My computer is mac, Macos version is 11.5 and webstorm version is 2021.3.3.
I can not test your updates that are for windows. Sorry

from vitest-jetbrains-plugin.

linux-china avatar linux-china commented on June 15, 2024

:) My laptop is Mac too, and it should work. Ignore that because some developers have reported Windows problem.

from vitest-jetbrains-plugin.

oooplz avatar oooplz commented on June 15, 2024

:) My laptop is Mac too, and it should work. Ignore that because some developers have reported Windows problem.

Thanks for your generous contributing for open-source.

from vitest-jetbrains-plugin.

oooplz avatar oooplz commented on June 15, 2024

@linux-china Take some time. I need adjust my project. I will reply to you ASAP. Pardon, sir.

from vitest-jetbrains-plugin.

oooplz avatar oooplz commented on June 15, 2024

@linux-china It's work for me! But when invoked in the way i clicking describe beside icon. It will throw error document is not defined. Becase the one test of describe is vue setup environment

 � × packages/vue/test/fields.spec.ts > foo > bar
   → document is not defined
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  packages/vue/test/fields.spec.ts > foo > bar

ReferenceError: document is not defined
 ❯ Proxy.mount node_modules/.pnpm/registry.npmmirror.com+@[email protected][email protected]/node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js:7757:14
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

    7755|     addToDoNotStubComponents(component);
    7756|     registerStub(originalComponent, component);
    7757|     var el = document.createElement('div');
       |              ^
    7758|     if (options === null || options === void 0 ? void 0 : options.atta…
    7759|         var to = void 0;
 ❯ packages/vue/test/fields.spec.ts:42:4

Test Files  1 failed (1)
     Tests  1 failed (1)
      Time  7.03s (in thread 22ms, 32020.24%)

It is test code. may can help for you.

import { describe, test } from 'vitest';
import { mount } from '@vue/test-utils';
import { defineComponent } from 'vue';

describe('foo', () => {
  test('bar', () => {
    const props = {
      foo: 1
    };

    const foobar = defineComponent({
      name: 'FooBar',
      template: `<div>abc</div>`
    });

    const Root = {
      components: {
        FooBar: foobar
      },
      template: `<foo-bar />`,
      setup() {}
    };

    mount(Root);
  });
});

from vitest-jetbrains-plugin.

oooplz avatar oooplz commented on June 15, 2024

@linux-china and i do not know why the test file had generated two file foo.spec.js and foo.spec.js.map in same dir.

from vitest-jetbrains-plugin.

userquin avatar userquin commented on June 15, 2024

@linux-china

FYI: I have this repo with only the vitest core tests you can use to test the plugin (not yet updated to latest): https://github.com/userquin/vitejs-vite-latest

I will check if your latest changes supporting monorepo with vitest itself is working on windows (with previous version not working).

EDIT: it works also on windows, great work man 👌 , also with colored console: https://imgur.com/wGYEk6S and https://imgur.com/Ox6M4Hu

from vitest-jetbrains-plugin.

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.