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

feat: Support for custom context and/or debug html files #1360

Closed
wants to merge 1 commit into from
Closed

feat: Support for custom context and/or debug html files #1360

wants to merge 1 commit into from

Conversation

obenjiro
Copy link

Adding support for custom context.html and debug.html

module.exports = function(config) {
  config.set({

    client: {
      // paths must be relative to CWD ( current working directory )
      contextFile: '/context.html',
      debugFile: '/debug.html'
    },

    ...

Ref: #488

@leehambley
Copy link

Stumbled upon this from #488. I'm keen on this idea, as I'm struggling with QUnit and es6 module loaders, the problem is QUnit racing against the async module loaders, which appears to mandate something akin to the following as a solution (but as yet untested) https://github.com/jrburke/requirejs/wiki/Test-frameworks#qunit

@jrolfs
Copy link

jrolfs commented Apr 28, 2015

I'm trying to migrate our test suite (10,000+) from jasmine-rails to Karma and this would definitely help. A lot of our legacy tests insert into a specific div in our current runner html.

@leehambley
Copy link

@jrolfs for what it's worth (and, that's "not much", I know) I "solved" my problem by using https://github.com/opudalo/generator-es6-lib which is a completely different stack of tools…

✓ mocha unit tests for browser and node

@jrolfs
Copy link

jrolfs commented Apr 28, 2015

@leehambley thanks for the suggestion (will be useful for other projects 😃), however unfortunately it's not really an option for the project in question.

@dignifiedquire dignifiedquire changed the title Support for custom context and/or debug html files feat: Support for custom context and/or debug html files Jun 4, 2015
@dignifiedquire
Copy link
Member

Thanks, this looks mostly good, a few things to do please

  • follow our commit message convention
  • update the docs so people can find these options
  • these options shouldn't be nested in the client configs, they should be top level and default to the ones karma brings
  • path normalization and setting defaults should be done in lib/config.js
  • please rebase onto the canary branch and make the PR against canary as this will become the new stable version in the next days

@obenjiro
Copy link
Author

obenjiro commented Jul 8, 2015

Ok. I will try to fix all of those point as soon as possible. Is it ok if in the end I'll make a new pull request ?

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@dignifiedquire
Copy link
Member

Is it ok if in the end I'll make a new pull request ?

Sure, github doesn't let you change the branch sadly

@obenjiro
Copy link
Author

obenjiro commented Jul 8, 2015

Ok. I will mention new pull request here..

@obenjiro
Copy link
Author

obenjiro commented Jul 8, 2015

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@ghost
Copy link

ghost commented Aug 18, 2015

I have applied the changes to the 0.13.9 release here: https://github.com/Sanjo/karma/tree/0.13.9%2Bcustom-context-html.
I have signed the CLA in the past.


var fileServer;
if (client && client.contextFile) {
fileServer = serveFile;

Choose a reason for hiding this comment

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

it seems like the rest of the file follows 2-space indentations; you have 4-space

@dignifiedquire
Copy link
Member

@sanjo could you open a new pr with your changes please?

@dignifiedquire
Copy link
Member

Closing due to inactivity

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

Successfully merging this pull request may close these issues.

6 participants