1.1.0 • Published 6 years ago

karma-git-http-server-middleware v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

karma-git-http-server-middleware

A karma middleware for 'git-http-backend', originally inspired by 'git-http-server'

How to use

npm install --save-dev karma-git-http-server-middleware

In your karma.config.js, add:

    beforeMiddleware: ['git-http-server'],
    gitHttpServer: {
      root: '__tests__/__fixtures__',
      route: 'git-server'
    },

Then in your JS code, you can reference git repos on disk via http://localhost:9876/git-server/name-of-repo.git.

This is useful for testing isomorphic-git and applications built using it.

Examples

See https://github.com/isomorphic-git/isomorphic-git/tree/master/__tests__

Dependencies

License

MIT

Changelog

1.0.0 - Initial release

2.0.0 - Copy repo on push (so repo stays untouched)