Giter Club home page Giter Club logo

Comments (9)

schicks avatar schicks commented on June 20, 2024 12

This does not appear to be released yet. When can we expect a 2.1.3 with this fix? Right now we're using jest 25 because we can't get 27 to work until this is out.

from svelte-jester.

mihar-22 avatar mihar-22 commented on June 20, 2024 4

Sorry about the delay, released 2.1.3!

from svelte-jester.

sebastianrothe avatar sebastianrothe commented on June 20, 2024 2

I will add some tests that mimic the usual usage to get this covered, finally.

from svelte-jester.

rmunn avatar rmunn commented on June 20, 2024

Reproduction steps:

  • Run npm init svelte@next
  • Edit tsconfig.json to remove comments (so npx apply rossyman/svelte-add-jest won't throw)
  • Run npx apply rossyman/svelte-add-jest
  • Run npm install
  • Run npm run test and see the exception that Jest throws

from svelte-jester.

rmunn avatar rmunn commented on June 20, 2024

Can confirm that #75 fixes this issue for me.

from svelte-jester.

jakobrosenberg avatar jakobrosenberg commented on June 20, 2024

For anyone else waiting for 2.1.3, I cloned and published the master branch to svelte-jester-pre-fix. To use it you can temporarily add "svelte-jester": "npm:svelte-jester-pre-fix@^2.1.3" to your devDependencies until the official 2.1.3 has been released.

It has fixed all issues for me but YMMV.

from svelte-jester.

asode avatar asode commented on June 20, 2024

Thank you for the update! However, still having some issues: though not sure if I'm the only one, but still getting an error about the preprocess.js file:

 FAIL  src/components/Layout.test.ts
  ● Test suite failed to run

    Cannot find module './preprocess.js'
    Require stack:
    - /home/asode/coding/my-svelte-vite-test/node_modules/svelte-jester/dist/transformer.cjs
    - /home/asode/coding/my-svelte-vite-test/node_modules/jest-util/build/requireOrImportModule.js
    - /home/asode/coding/my-svelte-vite-test/node_modules/jest-util/build/index.js
    - /home/asode/coding/my-svelte-vite-test/node_modules/@jest/core/build/cli/index.js
    - /home/asode/coding/my-svelte-vite-test/node_modules/@jest/core/build/jest.js
    - /home/asode/coding/my-svelte-vite-test/node_modules/jest-cli/build/cli/index.js
    - /home/asode/coding/my-svelte-vite-test/node_modules/jest-cli/bin/jest.js
    - /home/asode/coding/my-svelte-vite-test/node_modules/jest/bin/jest.js

    Require stack:
      node_modules/svelte-jester/dist/transformer.cjs
      node_modules/jest-util/build/requireOrImportModule.js
      node_modules/jest-util/build/index.js
      node_modules/@jest/core/build/cli/index.js
      node_modules/@jest/core/build/jest.js
      node_modules/jest-cli/build/cli/index.js
      node_modules/jest-cli/bin/jest.js
      node_modules/jest/bin/jest.js

      at Object.processSync [as process] (node_modules/svelte-jester/dist/transformer.cjs:115:32)
      at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:612:31)
      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:758:40)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:815:19)
  "devDependencies": {
    "@sveltejs/vite-plugin-svelte": "^1.0.0-next.24",
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/svelte": "^3.0.3",
    "@tsconfig/svelte": "^2.0.1",
    "@types/cssnano": "^4.0.1",
    "@types/jest": "^27.0.1",
    "@typescript-eslint/eslint-plugin": "^4.31.1",
    "@typescript-eslint/parser": "^4.31.1",
    "autoprefixer": "^10.3.4",
    "cssnano": "^5.0.8",
    "eslint-plugin-svelte3": "^3.2.1",
    "jest": "^27.2.0",
    "postcss": "^8.3.6",
    "postcss-load-config": "^3.1.0",
    "svelte": "^3.42.6",
    "svelte-check": "^2.2.6",
    "svelte-jester": "^2.1.3",
    "svelte-navigator": "^3.1.5",
    "svelte-preprocess": "^4.9.4",
    "tailwindcss": "^2.2.15",
    "ts-jest": "^27.0.5",
    "ts-node": "^10.2.1",
    "tslib": "^2.3.1",
    "typescript": "^4.4.3",
    "vite": "^2.5.10"
  }

from svelte-jester.

schicks avatar schicks commented on June 20, 2024

I'm also getting that issue. When I look in the svelte-jester folder in node modules it appears that the preprocess file is missing; there's just a transformer.cjs and a transformer.mjs file in the dist directory. Is it possible that something went wrong in the build process when publishing v2.1.3?

from svelte-jester.

sebastianrothe avatar sebastianrothe commented on June 20, 2024

Yeah, sorry about that. Will be fixed, see #81

from svelte-jester.

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.