tja4472 / angularfire-jest-tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add the Firebase Admin SDK to your server https://firebase.google.com/docs/admin/setup?authuser=0

Connect your app to the Authentication Emulator https://firebase.google.com/docs/emulator-suite/connect_auth?authuser=0

Get Started with Firebase Authentication on Websites https://firebase.google.com/docs/auth/web/start?authuser=0

Upgrade to 9.2.0 gives error in jest unit tests firebase/firebase-js-sdk#5687

  • npm 8.1.0
  • node v16.13.0
> Executing task: npm run test <


> ng-jest-cypress-template@0.0.0 test
> jest

ngcc-jest-processor: running ngcc
 PASS  src/app/services/service-a.service.spec.ts
 PASS  src/app/app.component.spec.ts
 FAIL  src/app/issue.spec.ts
  ● Test suite failed to run

    TypeError: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received 'http://localhost/index.node.cjs.js'

      at Function.createRequire (node_modules/jest-runtime/build/index.js:1813:23)

 FAIL  src/app/issue-compat.spec.ts
  ● Test suite failed to run

    TypeError: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received 'http://localhost/index.node.cjs.js'

      at Function.createRequire (node_modules/jest-runtime/build/index.js:1813:23)

Test Suites: 2 failed, 2 passed, 4 total
Tests:       4 passed, 4 total
Snapshots:   0 total
Time:        8.998 s
Ran all test suites.

About


Languages

Language:JavaScript 42.5%Language:TypeScript 41.6%Language:HTML 15.8%Language:CSS 0.0%