@ckeditor/ckeditor5-dev-utils
Advanced tools
Comparing version 7.0.1 to 7.0.2
Changelog | ||
========= | ||
## [7.0.2](https://github.com/ckeditor/ckeditor5-dev/compare/@ckeditor/ckeditor5-dev-utils@7.0.1...@ckeditor/ckeditor5-dev-utils@7.0.2) (2017-12-01) | ||
Internal changes only (updated dependencies, documentation, etc.). | ||
## [7.0.1](https://github.com/ckeditor/ckeditor5-dev/compare/@ckeditor/ckeditor5-dev-utils@7.0.0...@ckeditor/ckeditor5-dev-utils@7.0.1) (2017-12-01) | ||
@@ -5,0 +10,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-dev-utils", | ||
"version": "7.0.1", | ||
"version": "7.0.2", | ||
"description": "Utils for CKEditor 5 development tools packages.", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -14,5 +14,24 @@ /** | ||
describe( 'styles', () => { | ||
let getPostCssConfig; | ||
let getPostCssConfig, stubs; | ||
beforeEach( () => { | ||
stubs = { | ||
'./themeimporter': sinon.stub().returns( 'postcss-ckeditor5-theme-importer' ), | ||
'postcss-import': sinon.stub().returns( 'postcss-import' ), | ||
'postcss-mixins': sinon.stub().returns( 'postcss-mixins' ), | ||
'postcss-nesting': sinon.stub().returns( 'postcss-nesting' ), | ||
'./themelogger': sinon.stub().returns( 'postcss-ckeditor5-theme-logger' ), | ||
cssnano: sinon.stub().returns( 'cssnano' ) | ||
}; | ||
mockery.enable( { | ||
useCleanCache: true, | ||
warnOnReplace: false, | ||
warnOnUnregistered: false | ||
} ); | ||
for ( const stub in stubs ) { | ||
mockery.registerMock( stub, stubs[ stub ] ); | ||
} | ||
getPostCssConfig = require( '../../lib/styles/getpostcssconfig' ); | ||
@@ -27,3 +46,3 @@ } ); | ||
it( 'returns PostCSS plugins', () => { | ||
expect( getPostCssConfig().plugins.map( p => p.postcssPlugin ) ) | ||
expect( getPostCssConfig().plugins ) | ||
.to.have.members( [ | ||
@@ -39,12 +58,2 @@ 'postcss-import', | ||
it( 'passes options to the theme importer', () => { | ||
const themeImporterSpy = sinon.spy(); | ||
mockery.enable( { | ||
useCleanCache: true, | ||
warnOnReplace: false, | ||
warnOnUnregistered: false | ||
} ); | ||
mockery.registerMock( './themeimporter', themeImporterSpy ); | ||
getPostCssConfig( { | ||
@@ -57,3 +66,3 @@ themeImporter: { | ||
sinon.assert.calledWithExactly( themeImporterSpy, { | ||
sinon.assert.calledWithExactly( stubs[ './themeimporter' ], { | ||
themePath: 'abc', | ||
@@ -70,3 +79,3 @@ debug: true | ||
it( 'supports #minify option', () => { | ||
expect( getPostCssConfig( { minify: true } ).plugins.pop().postcssPlugin ) | ||
expect( getPostCssConfig( { minify: true } ).plugins.pop() ) | ||
.to.equal( 'cssnano' ); | ||
@@ -73,0 +82,0 @@ } ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
146879
3829