Skip to content
This repository has been archived by the owner on Oct 15, 2018. It is now read-only.

isomorphic-git/karma-git-http-server-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UNMAINTAINED!

This project has evolved into git-http-mock-server so that all these cool features can be used with any test framework not just Karma.

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

  • fixturez: Easily create and maintain test fixtures in the file system
  • git-http-backend: serve a git repository over http

License

MIT

Changelog

1.0.0 - Initial release

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