0.2.4 • Published 8 years ago

benderjs-amd v0.2.4

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

benderjs-amd

Basic AMD support for Bender.js using Require.js.

Installation

npm install benderjs-amd

Usage

Add benderjs-amd to the plugins array in your bender.js configuration file:

var config = {
    applications: {...}

    browsers: [...],

    plugins: [ 'benderjs-amd' ], // load the plugin

    tests: {...}
};

module.exports = config;

Add Require.js configuration in amd field:

var config = {
    applications: {...},

    // add your Require.js configuration
    'amd': {
        baseUrl: '/foo/bar/',
        paths: {
            foo: 'baz/foo'
        }
    },

    browsers: [...],

    plugins: [ 'benderjs-amd' ], // load the plugin

    tests: {...}
};

From now on the you can use bender.require to load scripts to test:

bender.require( [ 'Some/Module/ToTest' ], function( ToTest ) {
	"use strict";

	describe( 'ToTest', function() {
		it( 'should be tested with benderjs', function() {
			var testObj = new ToTest();
			expect( testObj.isRunning() ).to.be.true;
			// ...
		} );
	} );

} );

License

MIT, for license details see: LICENSE.md.

0.2.4

8 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago