Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect DOMSource type imported for Most.js and RxJs streamLib types #123

Open
maxhallinan opened this issue Jul 18, 2018 · 0 comments
Open

Comments

@maxhallinan
Copy link

Code to reproduce the issue:

  1. create-cycle-app .
  2. Select TypeScript
  3. Select "Most.js" or "RxJs" for "Which reactive stream library do you want to use?"
  4. Open src/interfaces.ts in the generated directory

Expected behavior:

src/interfaces.ts should import the DOMSource type for the selected stream library. This means @cycle/dom/most-typings for Most.js and @cycle/dom/rxjs-typings for RxJs.

Actual behavior:

src/interfaces.ts always imports DOMSource from @cycle/dom, which is typed for xstream streams.

Versions of packages used:

create-cycle-app@@4.0.0

I have code locally that fixes this bug. I haven't committed it yet because I can't get the tests to pass. Even with a fresh install on master and no local changes, tests fail with these errors:

Cloning into 'create-cycle-app'...
    expect(function).toThrowError(undefined)                                                                     

    Received value must be a function, but instead "object" was found

      at Object.test (test/integration/createCycleApp.spec.js:17:7)
          at new Promise (<anonymous>)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

  ● create-cycle-app › when invoked with the wrong arguments › should throw an error

    expect(function).toThrowError(undefined)

    Received value must be a function, but instead "object" was found

      at Object.test (test/integration/createCycleApp.spec.js:27:7)
          at new Promise (<anonymous>)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

  ● create-cycle-app › when invoked with the the correct arguments › it generate a correct package.json file

    expect(value).toMatchSnapshot()

    Received value does not match stored snapshot 1.

    Compared values have no visual difference.

      at Object.test (test/integration/createCycleApp.spec.js:60:75)
          at new Promise (<anonymous>)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

 › 1 snapshot test failed.
Snapshot Summary
 › 1 snapshot test failed in 1 test suite. Inspect your code changes or run with `npm test -- -u` to update them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant