You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.1 KiB
32 lines
1.1 KiB
8 years ago
|
import pkg from '../package.json';
|
||
9 years ago
|
|
||
7 years ago
|
const testDist = process.env.LIB_DIR === 'dist';
|
||
|
|
||
8 years ago
|
describe('antd dist files', () => {
|
||
9 years ago
|
// https://github.com/ant-design/ant-design/issues/1638
|
||
|
// https://github.com/ant-design/ant-design/issues/1968
|
||
8 years ago
|
it('exports modules correctly', () => {
|
||
5 years ago
|
// eslint-disable-next-line global-require,import/no-unresolved
|
||
|
const antd = testDist ? require('../dist/antd') : require('../components');
|
||
8 years ago
|
expect(Object.keys(antd)).toMatchSnapshot();
|
||
9 years ago
|
});
|
||
|
|
||
|
// https://github.com/ant-design/ant-design/issues/1970
|
||
|
// https://github.com/ant-design/ant-design/issues/1804
|
||
7 years ago
|
if (testDist) {
|
||
5 years ago
|
it('antd.js should export version', () => {
|
||
5 years ago
|
// eslint-disable-next-line global-require,import/no-unresolved
|
||
|
const antd = require('../dist/antd');
|
||
5 years ago
|
expect(antd).toBeTruthy();
|
||
|
expect(antd.version).toBe(pkg.version);
|
||
|
});
|
||
|
|
||
|
it('antd.min.js should export version', () => {
|
||
|
// eslint-disable-next-line global-require,import/no-unresolved
|
||
|
const antd = require('../dist/antd.min');
|
||
|
expect(antd).toBeTruthy();
|
||
8 years ago
|
expect(antd.version).toBe(pkg.version);
|
||
|
});
|
||
8 years ago
|
}
|
||
9 years ago
|
});
|