function plus() {
if ( ++count === expects ) {
start();
- Popcorn.removePlugin( "configurable" );
- Popcorn.removePlugin( "multiconfig" );
- Popcorn.removePlugin( "overridden" );
+
+
+ ["configurable", "multiconfig", "overridden"].forEach(function( val ) {
+ Popcorn.removePlugin( val );
+ delete Popcorn.manifest[ val ];
+ });
}
}
Popcorn.plugin( "overridden", function () {
return {
- _setup: function( options ) {
+ _setup: function( options ) {
equal( options.text, "hello!", 'options.text, overriden with "hello!" in overridden _setup');
plus();
equal( options.target, "custom", 'options.target, overriden with "custom" in overridden _setup');
plus();
- },
+ },
start: function( event, options ) {
equal( options.text, "hello!", 'options.text, overriden with "hello!" in overridden start');
plus();
});
-test( "Plugin extend", function () {
+test( "Popcorn Compose", function () {
QUnit.reset();
expect( expects );
stop( 15000 );
- ok( Popcorn.compose, "compose method exists" );
+ ok( Popcorn.compose, "Popcorn.compose method exists" );
plus();
- ok( Popcorn.effect, "effect method exists" );
+ ok( Popcorn.effect, "Popcorn.effect method exists" );
plus();
- ok( Popcorn.plugin.effect, "effect method exists" );
+ ok( Popcorn.plugin.effect, "Popcorn.plugin.effect method exists" );
plus();
Popcorn.plugin( "testPlugin", {});
})
.exec( 1, function() {
equals( test.one.running, 0, "no compose running" );
- plus();
+ plus();
equals( test.two.running, 0, "no effect running" );
plus();
})
// runs once, 2 tests
Popcorn.plugin( "pluginOptions1", {
_setup: function( options ) {
+ console.log( "runs once?" );
ok( options.pluginoption, "plugin option one exists at setup" );
plus();
ok( !options.composeoption, "compose option one does not exist at setup" );