|
@@ -11,8 +11,8 @@ describe( 'getPluginPath()', function() {
|
|
|
it( 'should return a proper path', function() {
|
|
it( 'should return a proper path', function() {
|
|
|
const CKEDITOR = modules.ckeditor;
|
|
const CKEDITOR = modules.ckeditor;
|
|
|
|
|
|
|
|
- var basePath = CKEDITOR.basePath;
|
|
|
|
|
- var path = CKEDITOR.getPluginPath( 'test' );
|
|
|
|
|
|
|
+ const basePath = CKEDITOR.basePath;
|
|
|
|
|
+ const path = CKEDITOR.getPluginPath( 'test' );
|
|
|
|
|
|
|
|
if ( CKEDITOR.isDev ) {
|
|
if ( CKEDITOR.isDev ) {
|
|
|
expect( path ).to.equal( basePath + 'node_modules/ckeditor-plugin-test/src/' );
|
|
expect( path ).to.equal( basePath + 'node_modules/ckeditor-plugin-test/src/' );
|
|
@@ -23,16 +23,16 @@ describe( 'getPluginPath()', function() {
|
|
|
|
|
|
|
|
it( '(the production version) should work even when in dev', function() {
|
|
it( '(the production version) should work even when in dev', function() {
|
|
|
const CKEDITOR = modules.ckeditor;
|
|
const CKEDITOR = modules.ckeditor;
|
|
|
- var core = modules[ 'ckeditor-core' ];
|
|
|
|
|
|
|
+ const core = modules[ 'ckeditor-core' ];
|
|
|
|
|
|
|
|
// To be able to run this test on both dev and production code, we need to override getPluginPath with the
|
|
// To be able to run this test on both dev and production code, we need to override getPluginPath with the
|
|
|
// core version of it and restore it after testing.
|
|
// core version of it and restore it after testing.
|
|
|
- var originalGetPluginPath = CKEDITOR.getPluginPath;
|
|
|
|
|
|
|
+ const originalGetPluginPath = CKEDITOR.getPluginPath;
|
|
|
CKEDITOR.getPluginPath = core.getPluginPath;
|
|
CKEDITOR.getPluginPath = core.getPluginPath;
|
|
|
|
|
|
|
|
// This test is good for both the development and production codes.
|
|
// This test is good for both the development and production codes.
|
|
|
- var basePath = CKEDITOR.basePath;
|
|
|
|
|
- var path = CKEDITOR.getPluginPath( 'test' );
|
|
|
|
|
|
|
+ const basePath = CKEDITOR.basePath;
|
|
|
|
|
+ const path = CKEDITOR.getPluginPath( 'test' );
|
|
|
|
|
|
|
|
// Revert the override before assertions or it will not do it in case of errors.
|
|
// Revert the override before assertions or it will not do it in case of errors.
|
|
|
CKEDITOR.getPluginPath = originalGetPluginPath;
|
|
CKEDITOR.getPluginPath = originalGetPluginPath;
|