Change apollo-angular imports to named non-namespace imports
See original GitHub issueIs your feature request related to a problem? Please describe.
Because of this https://github.com/thymikee/jest-preset-angular/issues/963 bug it is not possible to write tests with generated services.
Describe the solution you’d like
Imports for angular-apollo should be changed from import * as Apollo from 'apollo-angular';
to import {Apollo, ...} from 'apollo-angular'
Describe alternatives you’ve considered
Hacky solutions described in the jest-preset-angular issue, that might have other unknown effects.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:8
Top Results From Across the Web
Unable to use services exported under a namespace w/ Jest ...
import { Injectable } from '@angular/core'; @Injectable({ providedIn: 'root' }) export ... Change apollo-angular imports to named non-namespace imports ...
Read more >Migrating to Apollo Client 3.0 - Apollo GraphQL Docs
This article walks you through migrating your application to Apollo Client 3.0 ... To simplify the process of converting your import declarations from...
Read more >jest-namespace-imports-transformer - npm
This package contains a jest transformer that transforms *.ts and *.js files by replacing es6 namespace imports with named imports .
Read more >Using eslint with typescript - Unable to resolve path to module
You can set the ESLint module import resolution by adding this snippet to your .eslintrc.json configuration file:
Read more >isolatedModules - TSConfig Option - TypeScript
Exports of Non-Value Identifiers. In TypeScript, you can import a type and then subsequently export it: ts. import { someType , someFunction }...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the update. In that case, I will create one and link it here 😄
Nop I did not have time to do it. If so, I will posted it here