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

add adapter option #165

Closed
wants to merge 2 commits into from
Closed

add adapter option #165

wants to merge 2 commits into from

Conversation

jerryorta-dev
Copy link

@jerryorta-dev jerryorta-dev commented Jun 29, 2016

This PR is related to #164 and potentially #162.

This is a non-breaking change in that if no custom adapter is provided, the default adapter is used.

A sample implementation is here: https://github.com/UIUXEngineering/angular2-seed-jspm/blob/master/src/client/jspm.karma.ng2.adapter.js

@aviary2-wf
Copy link

Raven

Number of Findings: 0

@@ -25,7 +25,7 @@ Karma auto loads plugins unless you specify a plugins config. If you have one, y
plugins: ['karma-jspm', 'karma-phantomjs-launcher'],
```

The `loadFiles` configuration tells karma-jspm which files should be dynamically loaded via systemjs *before* the tests run. Globs or regular file paths are acceptable.
The `loadFiles` configuration tells karma-jspm which files should be dynamically loaded via systemjs *before* the tests run. Globs or regular file paths are acceptable.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is my WebStorm IDE adding a space, sorry

@maxwellpeterson-wf
Copy link
Contributor

What do you need to do in a custom karma-jspm adapter that can't be done in a regular included JS file or a separate plugin?

@jerryorta-dev
Copy link
Author

There is a race condition with files served ( and loaded ). I'm using the systemjs loader promise to ensure files are loaded prior to karma.start is called. Plus, there are angular2 conventions used to initiated unit tests.

https://github.com/UIUXEngineering/angular2-seed-jspm/blob/karma/src/client/jspm.karma.ng2.adapter.js#L96

@aviary-wf
Copy link

Raven

Number of Findings: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants