ant-design/tests/dekko/lib-es.test.js
afc163 0c97a6fa43
test: speed up test workflow (#50346)
* test: faster test.yml

* test: upgrade to node 20

* fix depends

* fix needs

* fix needs

* fix needs

* fix needs

* test: update test.yml

* test: update test.yml

* test: update test.yml

* test: update test.yml

* test: update test.yml

* test: update test.yml

* test: update test.yml

* test: update test.yml

* test: update test.yml

* fix: lib es test

* fix: lib es test

* fix: lib es test

* skip dist test in react lagacy

* Update test.yml

Signed-off-by: afc163 <afc163@gmail.com>

---------

Signed-off-by: afc163 <afc163@gmail.com>
2024-08-11 14:14:06 +08:00

27 lines
929 B
JavaScript

const $ = require('dekko');
const chalk = require('chalk');
$('lib').isDirectory().hasFile('index.js').hasFile('index.d.ts');
$('lib/*')
.filter((filename) => !['index.js', 'index.d.ts', '.map'].some((ext) => filename.endsWith(ext)))
.isDirectory()
.filter((filename) => !['style', '_util', 'locale'].some((ext) => filename.endsWith(ext)))
.hasFile('index.js')
.hasFile('index.d.ts');
// eslint-disable-next-line no-console
console.log(chalk.green('✨ `lib` directory is valid.'));
$('es').isDirectory().hasFile('index.js').hasFile('index.d.ts');
$('es/*')
.filter((filename) => !['index.js', 'index.d.ts', '.map'].some((ext) => filename.endsWith(ext)))
.isDirectory()
.filter((filename) => !['style', '_util', 'locale'].some((ext) => filename.endsWith(ext)))
.hasFile('index.js')
.hasFile('index.d.ts');
// eslint-disable-next-line no-console
console.log(chalk.green('✨ `es` directory is valid.'));