|
@@ -41,7 +41,7 @@ describe( 'Text transformation feature', () => {
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
- describe( 'plugin', () => {
|
|
|
|
|
|
|
+ describe( '#isEnabled', () => {
|
|
|
let plugin;
|
|
let plugin;
|
|
|
|
|
|
|
|
beforeEach( () => {
|
|
beforeEach( () => {
|
|
@@ -55,19 +55,9 @@ describe( 'Text transformation feature', () => {
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
it( 'should be enabled after initialization', () => {
|
|
it( 'should be enabled after initialization', () => {
|
|
|
- plugin.init();
|
|
|
|
|
-
|
|
|
|
|
expect( plugin.isEnabled ).to.be.true;
|
|
expect( plugin.isEnabled ).to.be.true;
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
- it( 'should initialize watchers after initialization', () => {
|
|
|
|
|
- const enableWatchersSpy = sinon.spy( plugin, '_enableTransformationWatchers' );
|
|
|
|
|
-
|
|
|
|
|
- plugin.init();
|
|
|
|
|
-
|
|
|
|
|
- sinon.assert.calledOnce( enableWatchersSpy );
|
|
|
|
|
- } );
|
|
|
|
|
-
|
|
|
|
|
it( 'should have active watchers when is enabled', () => {
|
|
it( 'should have active watchers when is enabled', () => {
|
|
|
const enableWatchersSpy = sinon.spy( plugin, '_enableTransformationWatchers' );
|
|
const enableWatchersSpy = sinon.spy( plugin, '_enableTransformationWatchers' );
|
|
|
|
|
|