Skip to content

TiMirLAN/karma-django-manage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

karma-django-manage

Call Django manage.py command before test runs.

Install

Run npm install TiMirLAN/karma-django-manage

Usage

In your karma config file:

  • Add django-manage into frameworks section.
  • Configure plugin with djangoManage object. djangoManage: {commands: [], manageFile: './manage.py'},

Example:

module.exports = function (config) {
  "use strict";
  config.set({
    basePath: '',
    frameworks: ['jasmine', 'django-manage'],
    files: [],
    exclude: [],
    djangoManage: {
      virtualenvDir: './env',
      commands: ['dumpdata'],
      manageFile: './manage.py',
      appendToFiles: ['command_that_return_filename']
      silent: true
    },
    reporters: ['progress'],
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['PhantomJS'],
    singleRun: true
  });
};

Configuration

  • virtualenvDir - Path to virtualenv folder. (optional)
  • commands - List of manage.py commands, that should be executed.
  • appendToFiles - List of manage.py commands, that return filename in stdout. That filename will be added into files list of carma config;
  • manageFile - Path to manage.py file.
  • silent - If true, there are no command output in karma console (optional).

About

Call Django manage.py command before test runs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •