stencil-community / stencil-app-starter

Minimal starter project for building web components with Stencil
https://github.com/ionic-team/stencil
MIT License
320 stars 102 forks source link

Tests fail on fresh clone #33

Closed jeremiecarlson closed 6 years ago

jeremiecarlson commented 6 years ago

Resources: Before submitting an issue, please consult our docs.

Stencil version: (run npm list @stencil/core from a terminal/cmd prompt and paste output below):

@stencil/core@0.0.8-9

I'm submitting a ... (check one with "x") [x] bug report

Current behavior: npm run test fails off of fresh clone.

Expected behavior: tests should pass

Steps to reproduce: clone latest, npm install, npm run test

Code

$ npm run test

> @stencil/starter@0.0.1 test ****************/stencil-app-starter
> jest --no-cache

 PASS  src/components/app-home/app-home.spec.ts
 FAIL  src/components/app-profile/app-profile.spec.ts
  ● app-profile › rendering › should not render any content if there is not a match

    No registered components found

      at Object.<anonymous> (node_modules/@stencil/core/testing/index.js:3764:31)
      at step (node_modules/@stencil/core/testing/index.js:3725:23)
      at Object.next (node_modules/@stencil/core/testing/index.js:3706:53)
      at fulfilled (node_modules/@stencil/core/testing/index.js:3697:58)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

  ● app-profile › rendering › should not render any content if there is not a match

    TypeError: Cannot read property '__testPlatform' of undefined

      at node_modules/@stencil/core/testing/index.js:3778:24
          at new Promise (<anonymous>)
      at Object.flush (node_modules/@stencil/core/testing/index.js:3777:12)
      at Object.<anonymous> (src/components/app-profile/app-profile.spec.ts:68:60)
      at step (src/components/app-profile/app-profile.spec.ts:32:23)
      at Object.next (src/components/app-profile/app-profile.spec.ts:13:53)
      at src/components/app-profile/app-profile.spec.ts:7:71
          at new Promise (<anonymous>)
      at Object.<anonymous>.__awaiter (src/components/app-profile/app-profile.spec.ts:3:12)
      at Object.<anonymous> (src/components/app-profile/app-profile.spec.ts:65:90)
          at new Promise (<anonymous>)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

  ● app-profile › rendering › should work with a name passed

    No registered components found

      at Object.<anonymous> (node_modules/@stencil/core/testing/index.js:3764:31)
      at step (node_modules/@stencil/core/testing/index.js:3725:23)
      at Object.next (node_modules/@stencil/core/testing/index.js:3706:53)
      at fulfilled (node_modules/@stencil/core/testing/index.js:3697:58)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

  ● app-profile › rendering › should work with a name passed

    TypeError: Cannot set property 'match' of undefined

      at Object.<anonymous> (src/components/app-profile/app-profile.spec.ts:80:39)
      at step (src/components/app-profile/app-profile.spec.ts:32:23)
      at Object.next (src/components/app-profile/app-profile.spec.ts:13:53)
      at src/components/app-profile/app-profile.spec.ts:7:71
          at new Promise (<anonymous>)
      at Object.<anonymous>.__awaiter (src/components/app-profile/app-profile.spec.ts:3:12)
      at Object.<anonymous> (src/components/app-profile/app-profile.spec.ts:76:67)
          at new Promise (<anonymous>)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

Other information: Can't tell if this is an issue with the starter or stencil itself. I have a separate project based on this start kit which last passed successfully 4 days ago, but is not failing in the same manner so I imagine something has changed upstream but I can't parse it from the docs.

alexmahan commented 6 years ago

I'm having the same issue as above, receiving this when exiting the failed tests:

Test Suites: 1 failed, 2 passed, 3 total
Tests:       2 failed, 3 passed, 5 total
Snapshots:   0 total
Time:        4.056s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @stencil/starter@0.0.1 test: `jest --no-cache`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @stencil/starter@0.0.1 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
tdreyno commented 6 years ago

Confirmed that tests pass if setting version to 0.0.8-8. So this is regression with just the -9 release

jgw96 commented 6 years ago

Hello all! As this core cause of this issue is with Stencil itself and not the starter I am going to close this as a duplicate of https://github.com/ionic-team/stencil/issues/355. Thanks for using Stencil!