Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

benderjs-amd

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

benderjs-amd

Basic AMD support for Bender.js

  • 0.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 22 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc