ionic-team / ionic-pwa-toolkit

Build lightning fast Progressive Web Apps with zero config and best practices built-in. Go from zero to production ready with Ionic and Stencil (Web Components).
MIT License
633 stars 74 forks source link

Some tests fail #38

Closed pwespi closed 6 years ago

pwespi 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):

    "@ionic/core": "^0.1.4",
    "@stencil/core": "0.7.7",

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com

Current behavior: Some tests fail.

Expected behavior: All tests pass.

Steps to reproduce:

git clone https://github.com/ionic-team/ionic-pwa-toolkit.git my-pwa
cd my-pwa
git remote rm origin
npm install
npm test

Related code:

Other information:

> jest --no-cache

 PASS  src\components\app-home\app-home.spec.ts
 FAIL  src\components\my-app\my-app.spec.ts
  ● Test suite failed to run

    TypeError: Cannot read property 'getAttribute' of undefined

      at Object.<anonymous>.m.ios (node_modules/@ionic/core/dist/ionic.js:5:575)
      at Object.<anonymous> (node_modules/@ionic/core/dist/ionic.js:5:1271)
      at Object.<anonymous> (src/components/my-app/my-app.tsx:8:1)
      at Object.<anonymous> (src/components/my-app/my-app.spec.ts:40:16)
          at Generator.next (<anonymous>)
          at new Promise (<anonymous>)
      at handle (node_modules/worker-farm/lib/child/index.js:44:8)
      at process.<anonymous> (node_modules/worker-farm/lib/child/index.js:51:3)
      at emitTwo (events.js:126:13)
      at process.emit (events.js:214:7)
      at emit (internal/child_process.js:772:12)
      at _combinedTickCallback (internal/process/next_tick.js:141:11)
      at process._tickCallback (internal/process/next_tick.js:180:9)

 FAIL  src\components\app-profile\app-profile.spec.ts (7.734s)
  ● app-profile › rendering › should not render any content if there is not a match

    expect(received).toEqual(expected)

    Expected value to equal:
      ""
    Received:
      "Ionic PWA ToolkitHello! My name is . My name was passed in through a route param!"

      at Object.<anonymous> (src/components/app-profile/app-profile.spec.ts:66:53)
      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 fulfilled (src/components/app-profile/app-profile.spec.ts:4:58)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

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

    expect(received).toEqual(expected)

    Expected value to equal:
      "Hello! My name is stencil. My name was passed in through a route param!"
    Received:
      "Hello! My name is . My name was passed in through a route param!"

      at Object.<anonymous> (src/components/app-profile/app-profile.spec.ts:85:54)
      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 fulfilled (src/components/app-profile/app-profile.spec.ts:4:58)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

Test Suites: 2 failed, 1 passed, 3 total
Tests:       2 failed, 2 passed, 4 total
Snapshots:   0 total
Time:        10.36s
Ran all test suites.
npm ERR! Test failed.  See above for more details.
JStumpp commented 6 years ago

Same issue as here: https://github.com/ionic-team/stencil/issues/675

jgw96 commented 6 years ago

Hello all! Closing this as a duplicate of https://github.com/ionic-team/stencil/issues/675