0.4.0 • Published 10 years ago

karma-ozjs v0.4.0

Weekly downloads
1
License
-
Repository
github
Last release
10 years ago

karma-ozjs

A Karma plugin. Adapter for the OzJS framework.

Installation

The easiest way is to keep karma-ozjs as a devDependency in your package.json.

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-ozjs": "~0.1"
  }
}

You can simple do it by:

npm install karma-ozjs --save-dev

Configuring Karma

// karma.conf.js
module.exports = function(config) {
    config.set({
        // frameworks to use
        frameworks: ['mocha', 'ozjs'],
        // list of files / patterns to load in the browser
        files: [
            { pattern: 'js/vendor/**/*.js', included: false },
            { pattern: 'js/appname/**/*.js', included: false },
            "test/config.js"
            "test/tests.js"
        ],
        // ...

Configuring oz.js

// test/config.js
require.config({
    // Karma serves files from '/base'
    baseUrl: 'base/js/vendor/',
    aliases: {
        'appname': '../appname/'
    }
});
// test/tests.js
require([
    'dollar'
    'appname/app'
], function($, app){

    describe('app.wrapper', function(){
        it('sould be an Dollar object', function(){
            expect(app.wrapper).to.be.an.instanceof($);
        });
    });

});

Source code

More References

Release History

See OzJS Release History

License

Copyright (c) 2010 - 2013 dexteryy
Licensed under the MIT license.

0.4.0

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago