Skip to content

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

Description

@maxhallinan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions