ionic-team / ionic-team/ionic-unit-testing-example

Error: StaticInjectorError(t)[t -> function(){}]:

Open
#95 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
370
Forks
144
PR merge metrics
No merged PRs in 30d

Description

wrote same code as in page1.spec.ts still getting this error.

Error: StaticInjectorError(t)[t -> function(){}]:
StaticInjectorError(Platform: core)[t -> function(){}]:
NullInjectorError: No provider for function(){}!
error properties: Object({ ngTempTokenPath: null, ngTokenPath: [ 't', Function ], ngDebugContext: t({ view: Object({ def: Object({ factory: Function, nodeFlags: 33669121, rootNodeFlags: 33554433, nodeMatchedQueries: 0, flags: 0, nodes: [ Object({ nodeIndex: 0, parent: null, renderParent: null, bindingIndex: 0, outputIndex: 0, checkIndex: 0, flags: 33554433, childFlags: 114688, directChildFlags: 114688, childMatchedQueries: 0, matchedQueries: Object({ }), matchedQueryIds: 0, references: Object({ }), ngContentIndex: null, childCount: 1, bindings: [ ], bindingFlags: 0, outputs: [ ], element: Object({ ns: '', name: 'signup', attrs: [ ], template: null, componentProvider: Object({ nodeIndex: 1, parent: , renderParent: , bindingIndex: 0, outputIndex: 0, checkIndex: 1, flags: 114688, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries: Object, matchedQueryIds: 0, references: Object, ngContentIndex: -1, childCount: 0, bindings: ...
at t.get (webpack:///node_modules/@angular/core/esm5/core.js:1003 <- test-config/karma-test-shim.js:45:142)
at webpack:///node_modules/@angular/core/esm5/core.js:1301 <- test-config/karma-test-shim.js:52:2444
at yt (webpack:///node_modules/@angular/core/esm5/core.js:1243 <- test-config/karma-test-shim.js:52:2462)
at t.get (webpack:///node_modules/@angular/core/esm5/core.js:1111 <- test-config/karma-test-shim.js:52:1621) at webpack:///node_modules/@angular/core/esm5/core.js:1301 <- test-config/karma-test-shim.js:52:2444
at yt (webpack:///node_modules/@angular/core/esm5/core.js:1243 <- test-config/karma-test-shim.js:52:2462)
at t.get (webpack:///node_modules/@angular/core/esm5/core.js:1111 <- test-config/karma-test-shim.js:52:1621) at hi (webpack:///node_modules/@angular/core/esm5/core.js:10896 <- test-config/karma-test-shim.js:298:683)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.