Coder Social home page Coder Social logo

Comments (11)

kwonoj avatar kwonoj commented on June 19, 2024 1

published 1.0.4.

from rx-sandbox.

kwonoj avatar kwonoj commented on June 19, 2024

I think this is due to nature of jest itself which is not intended to be used in browser environment. Same goes for this pkg, it is intended to be used as test suite without any bundler support.

I am unsure if this can be fixed in viable timeframe as I do not have any env attempt to bundle this pkg. If you have quick fix to suggest, welcome to have PR.

from rx-sandbox.

selangley-wa avatar selangley-wa commented on June 19, 2024

For what it's worth, I get similar errors for a different angular project.

This sample project by Michael Hoffmann using rx-sandbox and Angular 8.0.1 works as expected when running jasmine tests via the browser using karma:
https://github.com/Mokkapps/angular-rx-sandbox-marble-diagram

If you keep upgrading the angular-cli, you eventually reach a point where it breaks. Specifically, it breaks similarly to the reported issue when you go from:

    "@angular-devkit/build-angular": "0.803.22",
    "@angular/cli": "8.3.22",

to:

    "@angular-devkit/build-angular": "0.803.23",
    "@angular/cli": "8.3.23",

Looking at the differences between versions, I'm not sure why it starts erroring:

(angular/angular-cli@v8.3.22...v8.3.23

from rx-sandbox.

selangley-wa avatar selangley-wa commented on June 19, 2024

I was able to narrow down why angular stopped working with rx-sandbox to this commit:

fix(@angular-devkit/build-angular): replace istanbul-instrumenter-loader with coverage-istanbul-loader

where core-js@2 was removed in favor of core-js@3, babel@6 was removed as a dependency, among other changes.

from rx-sandbox.

selangley-wa avatar selangley-wa commented on June 19, 2024

Another follow-up. The compatibility issues I was having with later versions of angular go away with the recent changes to rx-sandbox that depend on updated versions of the jest libraries, including the switch from jest-matchers to jest's expect package.

Perhaps you could release such a version as [email protected] that incorporated all those changes except for the migration to RxJS 7 on a 1.x branch?

from rx-sandbox.

kwonoj avatar kwonoj commented on June 19, 2024

I'll give it a go but can't promise I can do it 100%, there was se rough edges if I recall correctly.

from rx-sandbox.

selangley-wa avatar selangley-wa commented on June 19, 2024

Here's mine that seems to work. .
https://github.com/selangley-wa/rx-sandbox/tree/1.x

In my angular 8 project that consumes rx-sandbox, I had to set the value:
"skipLibCheck": false,
in the compilerOptions in the tsconfig.json file in order to avoid the error:

ERROR in node_modules/rx-sandbox/dist/scheduler/TestScheduler.d.ts:18:9 - error TS1086: An accessor cannot be declared in an ambient context.

18     get maxFrame(): number;

from rx-sandbox.

kwonoj avatar kwonoj commented on June 19, 2024

if you have working changes already, I'd welcome & appreciate PR 😅

from rx-sandbox.

selangley-wa avatar selangley-wa commented on June 19, 2024

Want to create a 1.x branch for my PR to target?

from rx-sandbox.

kwonoj avatar kwonoj commented on June 19, 2024

Good point, let me try.

from rx-sandbox.

kwonoj avatar kwonoj commented on June 19, 2024

@selangley-wa https://github.com/kwonoj/rx-sandbox/tree/release-1.x is up

from rx-sandbox.

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.