Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample karma test of app that uses ngx-config #22

Closed
datasmithtech opened this issue Aug 18, 2017 · 3 comments
Closed

sample karma test of app that uses ngx-config #22

datasmithtech opened this issue Aug 18, 2017 · 3 comments
Labels

Comments

@datasmithtech
Copy link

I'm submitting a
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ x] Support request =>
[ ] Feature request
[x] Documentation issue or request

I require a sample karma test of an app that uses ngx-config, so i may follow how to create a karma test spec of an angular app that uses ngx-config

@fulls1z3
Copy link
Owner

@datasmithtech actually yes, but last week I moved all projects into a single repository and karma config needs further improvisation.

You can use the spec.ts files, they're alright. And the karma config, better copy from ng-seed/universal:

Finally, the webpack.test.js, copy it from `ngx-ps'

These config files should work without a problem. In case of trouble, let me know!

@fulls1z3 fulls1z3 changed the title Sample karma test of app that uses ngx-config [question] sample karma test of app that uses ngx-config Aug 22, 2017
@datasmithtech
Copy link
Author

i referred to your files, however, i created my project using ng cli, so i think majority of settings should be fine. i.e. hestitate to change anything, since not familiar with webpack

i now get following error
TypeError: this.loader.loadSettings is not a function
at ConfigService.webpackJsonp.../../../../@ngx-config/core/src/config.service.js.ConfigService.init (http://localhost:9876/_karma_webpack_/webpack:/Users/dev/projects/wcoc-client-dev/~/@ngx-config/core/src/config.service.js:10:1)
at Array.res (http://localhost:9876/_karma_webpack_/webpack:/Users/dev/projects/wcoc-client-dev/~/@ngx-config/core/index.js:13:28)

@fulls1z3
Copy link
Owner

fulls1z3 commented Sep 5, 2017

@datasmithtech finally I managed to solve the issues with tests, and switched to the faster alternative: the jest platform.

You can have a look at the test configuration on this repo.

@fulls1z3 fulls1z3 changed the title [question] sample karma test of app that uses ngx-config sample karma test of app that uses ngx-config Sep 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants