ant-design/tests/dekko/lib.test.js

30 lines
671 B
JavaScript
Raw Normal View History

const $ = require('dekko');
2018-12-23 17:45:31 +08:00
const chalk = require('chalk');
$('lib')
.isDirectory()
.hasFile('index.js')
.hasFile('index.d.ts');
$('lib/*')
2019-07-18 15:13:23 +08:00
.filter(
filename =>
!filename.endsWith('index.js') &&
!filename.endsWith('index.d.ts') &&
!filename.endsWith('.map'),
)
.isDirectory()
2018-11-28 15:00:03 +08:00
.filter(filename => !filename.endsWith('style') && !filename.endsWith('_util'))
.hasFile('index.js')
.hasFile('index.d.ts')
.hasDirectory('style');
$('lib/*/style')
.hasFile('css.js')
.hasFile('index.js');
2018-12-07 16:17:45 +08:00
$('lib/style').hasFile('v2-compatible-reset.css');
2016-12-11 14:01:14 +08:00
// eslint-disable-next-line
2018-12-23 17:45:31 +08:00
console.log(chalk.green('✨ `lib` directory is valid.'));